k3sup install --ip=10.68.0.143 --user=root --k3s-version=v1.18.8+k3s1
kubectl apply -f pod.yaml
kubectl logs myapp-pod
kubectl get po -w
kubectl delete po myapp-pod
- we can launch random stuff, but this isn't repeatable
kubectl create deploy nginx --image=nginx:1.16-alpine
kubectl get deploy
kubectl get po
kubectl delete deploy/nginx
- launch again using kustomize templates
kubectl create deploy nginx --image=nginx:1.16-alpine --dry-run -o yaml > deployment/base/deployment.yaml
kubectl apply -k deployment/base
kubectl get deploy
kubectl get po
- describe pod, look at the image
- scale deployment manually
kubectl scale deploy/nginx --replicas=3
kubectl rollout status deploy/nginx
kubectl get deploy
kubectl get po
kubectl set image deploy/nginx nginx=nginx:1.17-alpne --record
kubectl rollout status deploy/nginx
kubectl get po
kubectl rollout undo deploy/nginx
- redo upgrade from manifest
kustomize build deployment/base
- edit base to change image and then apply
kubectl apply -k deployment/base
- how can we use this for different environments?
kustomize build deployment/overlay/staging
kustomize build deployment/overlay/production
kubectl apply -k deployment/overlay/staging
kubectl apply -k deployment/overlay/production
kubectl get deploy
kubectl get pods
- show ConfigMaps
- explain what they're for
- explain how they're generated by Kustomize
- they'll show up later
- show services listening as NodePort
- go look at them
curl -I training-a:<port>
- show
deployment/overlay/ingress/single/ingress.yaml
kubectl apply -k deployment/overlay/ingress/single
kubectl get ingress
kustomize build deployment/overlay/ingress/fanout
kubectl apply -k deployment/overlay/ingress/fanout
kustomize build rancher-demo/base
kubectl apply -k rancher-demo/base
docker run -d --restart=unless-stopped -p 80:80 -p 443:443 -v /opt/rancher:/var/lib/rancher rancher/rancher:v2.4.5
- Show how we would deploy an RKE cluster
- Import the
training-a
k3s cluster
Rancher Server Walkthrough
- Clusters
- Authentication & Security
- Storage
- Projects
- Namespaces
- Catalogs
- CLI/API/Kubectl
- show workloads on running cluster
- edit them / delete them
- redeploy
monachus/rancher-demo
as a workload
- put an Ingress in front of it
- use
training-a.cl.monach.us
- scale it
Rancher Application Catalog