Add 'plugins/traefik/' from commit 'aef1f9e0dd205ea9cdea9e3ccf11900c5fe79b1f'

git-subtree-dir: plugins/traefik
git-subtree-mainline: 1a14070131
git-subtree-split: aef1f9e0dd
This commit is contained in:
Alexis Couvreur
2022-09-30 14:32:09 +00:00
86 changed files with 24035 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
# Kubernetes
## Run the demo
# you need docker-compose, kubectl and helm (v3) installed
1. `git clone git@github.com:acouvreur/traefik-ondemand-plugin.git`
2. `cd traefik-ondemand-plugin/examples/kubernetes`
3. `docker-compose up`
4. Wait 1 minute
5. `export KUBECONFIG=./kubeconfig.yaml`
5. `helm repo add traefik https://helm.traefik.io/traefik`
6. `helm repo update`
7. Edit values.yaml and add your traefik pilot.token
8. `helm install traefik traefik/traefik -f values.yaml --namespace kube-system `
9. `kubectl apply -f deploy-whoami.yml`
10. `kubectl apply -f manifests.yml`
11. `kubectl scale deploy whoami --replicas=0`
12. Browse to http://localhost/
13. `kubectl get deployments -o wide`
```
NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR
whoami 1/1 1 1 16m whoami containous/whoami app=whoami
```
13. After 1 minute: `kubectl get deployments -o wide`
```
NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR
whoami 0/0 0 0 17m whoami containous/whoami app=whoami`
```
14. Browse to http://localhost/