Skip to content

Latest commit

 

History

History
61 lines (44 loc) · 2.66 KB

readme.md

File metadata and controls

61 lines (44 loc) · 2.66 KB

How to test Traefik with k3d

Context

Working with kubernetes could be difficult and heavy for a developer (or a lambda person), that's why some tools like k3s are useful to work with a "lightweight" Kubernetes environment. K3d is an helper to launch k3s with docker.

This repository contains several scenario, each directory is a step from beginner to advance usage of k3d & Traefik. The goal is not to provide production ready configuration, this guide is for helping user/developer to understand how Traefik works and how to test it easily with Kubernetes.

First step

The step1 directory presents the very first step in the k3d usage with Traefik. You will see how to start k3d and start our own Traefik.

Command Cheat Sheet

# launch the cluster, exports the wanted ports and avoid that the default traefik configuration to be deployed
k3d create --api-port 6550 --publish 80:80 --publish 443:443 --publish 8080:8080 --server-arg '--no-deploy=traefik' 

# set your environement variable to access the cluster with kubectl
export KUBECONFIG="$(k3d get-kubeconfig --name='k3s-default')"

# import a freshly compiled image of traefik into the cluster
k3 import-images containous/traefik:latest 

# check the stack
kubectl get all --all-namespaces

# apply the yaml configuration in the conf-1 directory
kubectl apply -f conf/

# kill the cluster
k3d delete

References

Glossary

  • Helm Charts: A package manager for Kubernetes

Links