Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- student@control:~$ history
- 1 git clone https://github.com/sandervanvugt/cka
- 2 cd cka
- 3 ls
- 4 ./setup-container.sh
- 5 ./setup-kubetools.sh
- 6 sudo ./setup-kubetools.sh
- 7 ip a
- 8 sudo vim /etc/hosts
- 9 sudo kubeadm init
- 10 192.168.29.157 control.example.com control
- 11 192.168.29.158 worker1.example.com worker1
- 12 192.168.29.159 worker2.example.com worker2
- 13 192.168.29.157 control.example.com control
- 14 192.168.29.158 worker1.example.com worker1
- 15 192.168.29.159 worker2.example.com worker2
- 16 sudo kubeadm --help
- 17 sudo kubeadm reset
- 18 sudo -i
- 19 cd
- 20 mkdir .kube
- 21 sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
- 22 sudo chown $(id -u):$(id -g) $HOME/.kube/config
- 23 kubectl get all
- 24 kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
- 25 kubectl get nodes
- 26 top
- 27 ls
- 28 sudo kubeadm init
- 29 sudo -i
- 30 kubectl get all
- 31 kubectl get nodes
- 32 vim varsfile
- 33 kubectl create cm mydbvars --from-env-file=varsfile
- 34 source <(kubectl completion bash)
- 35 kubectl create deployment mydb --image=mariadb --replicas=3
- 36 kubectl get all
- 37 kubectl set env deploy mydb --from=configmap/mydbvars
- 38 kubectl get all
- 39 kubectl get deploy mydb -o yaml
- 40 echo "hello friday" > index.html
- 41 kubectl create vm myindex --from-file=index.html
- 42 kubectl create cm myindex --from-file=index.html
- 43 kubectl describe cm myindex
- 44 kubectl create deploy myweb --image-nginx
- 45 kubectl create deploy myweb --image=nginx
- 46 kubectl get all
- 47 kubectl edit deploy myweb
- 48 kubectl get pods
- 49 kubectl exec -it myweb-ff8bf9988-hw7m2 -- cat /usr/share/nginx/html/index.html
- 50 historu
- 51 history
- 52 kubectl create secret -h
- 53 kubectl create secret docker-registry -h
- 54 kubectl create secret docker-registry my-docker-credentials --docker-username=unclebob --docker-password=password [email protected] --docker-server=myregistry:5000
- 55 kubectl describe secrets my-docker-credentials
- 56 kubectl get -o yaml secrets my-docker-credentials
- 57 echo eyJhdXRocyI6eyJteXJlZ2lzdHJ5OjUwMDAiOnsidXNlcm5hbWUiOiJ1bmNsZWJvYiIsInBhc3N3b3JkIjoicGFzc3dvcmQiLCJlbWFpbCI6InVuY2xlQGJvYi5vcmciLCJhdXRoIjoiZFc1amJHVmliMkk2Y0dGemMzZHZjbVE9In19fQ== | base64 -d
- 58 ip a
- 59 ls
- 60 tar xvf helm-v3.8.2-linux-amd64.tar.gz
- 61 sudo mv linux-amd64/helm /usr/local/bin/
- 62 helm version
- 63 helm repo list
- 64 helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard
- 65 helm repo list
- 66 helm install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard
- 67 echo $POD_NAME
- 68 echo https://127.0.0.1:8443/
- 69 kubectl -n default port-forward $POD_NAME 8443:8443
- 70 bg
- 71 ip a
- 72 ss -tunap | less
- 73 jobs
- 74 fg
- 75 kubectl port-forward -h
- 76 kubectl -n default port-forward $POD_NAME --address localhost,192.168.29.157 8443:8443
- 77 bg
- 78 ss -tunap | less
- 79 kubectl get pods -o wide
- 80 ls
- 81 git clone https://github.com/sandervanvugt/kube3weeks
- 82 cd kube3weeks/
- 83 history
- 84 sleep 120; countdown 10
- 85 ./countdown 8
- 86 kubectl get pods -o wide
- 87 kubectl describe pod kubernetes-dashboard-585b459448-9vch2
- 88 kubectl describe pod kubernetes-dashboard-585b459448-9vch2 | less
- 89 history
- 90 helm repo add bitnami https://charts.bitnami.com/bitnami
- 91 helm repo list
- 92 helm search repo bitnami
- 93 helm repo update
- 94 helm list
- 95 kubectl get all
- 96 helm install bitnami/mysql --generate-name
- 97 helm show chart bitnami/mysql
- 98 helm show all bitnami/mysql
- 99 helm list
- 100 helm status mysql
- 101 helm status mysql-1650634346
- 102 source <(helm completion bash)
- 103 helm show values bitnami/nginx
- 104 helm pull bitnami/nginx
- 105 ls
- 106 tar xvf nginx-10.1.3.tgz
- 107 cd nginx/
- 108 ls
- 109 vim values.yaml
- 110 cd ..
- 111 helm install -f nginx/values.yaml mynginx nginx/
- 112 helm list
- 113 cd ..
- 114 git clone https://github.com/sandervanvugt/microservices
- 115 cd microservices/
- 116 ls
- 117 vim kustomization.yaml
- 118 cd lesson6lab/
- 119 ls
- 120 vim kustomization.yaml
- 121 kubectl api-resources | grep template
- 122 cd
- 123 helm upgrade --install ingress-nginx ingress-nginx --repo https://kubernetes.github.io/ingress-nginx --namespace ingress-nginx --create-namespace
- 124 kubectl get all
- 125 kubectl get secret
- 126 kubectl get pods -n ingress-nginx
- 127 kubectl describe -n ingress-nginx pods ingress-nginx-controller-7575567f98-vsmnz | less
- 128 kubectl get all -n ingress-nginx
- 129 kubectl create deploy nginxsvc --image=nginx --port=80
- 130 kubectl expose deploy nginxsvc
- 131 kubectl get all
- 132 kubectl edit svc nginxsvc
- 133 kubectl edit -n ingress-nginx svc ingress-nginx-controller
- 134 kubectl create ingress nginxsvc --class=nginx --rule=nginxsvc.info/*=nginxsvc:80
- 135 kubectl describe ingress nginxsvc
- 136 kubectl port-forward -n ingress-nginx svc/ingress-nginx-controller 8080:80
- 137 bg
- 138 curl nginxsvc.info
- 139 cd kube3weeks/
- 140 history
- 141 sleep 120; ./countdown 10
- 142 sudo cat /etc/kubelet/
- 143 sudo cat /var/lib/kubelet/config.conf
- 144 kubectl get all
- 145 vim statefulset.yaml
- 146 kubectl create -f statefulset.yaml
- 147 kubectl get pods
- 148 kubectl describe pod web-0
- 149 kubectl get pvc
- 150 top
- 151 kubectl apply -f https://github.com/kubernetes-sigs/metrics-servers/releases/latest/download/components.yaml
- 152 kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
- 153 kubectl get pods -n kube-system
- 154 kubectl logs -n kube-system metrics-server-847dcc659d-xgnjp
- 155 kubectl edit deploy -n kube-system metrics-server
- 156 kubectl get pods -n kube-system
- 157 kubectl edit deploy -n kube-system metrics-server
- 158 kubectl get pods -n kube-system
- 159 kubectl top nodes
- 160 kubectl top pods
- 161 cd ..
- 162 git clone https://github.com/sandervanvugt/ckad
- 163 cd ckad
- 164 cd autoscaling/
- 165 ls
- 166 vim Dockerfile
- 167 sudo apt install docker.io
- 168 sudo docker build -t php-apache .
- 169 vim hpa.yaml
- 170 kubectl apply -f hpa.yaml
- 171 kubectl get all
- 172 kubectl autoscale deploy php-apache --cpu-percent=50 --min=1 --max=10
- 173 kubectl get hpa
- 174 kubectl run -it load-generator --rm --image=busybox --restart=Never -- /bin/sh -c "while sleep 0.01; do wget -q -O- http://php-apache; done"
- 175 kubectl get pods
- 176 kubectl get hpa
- 177 cd ..
- 178 history
- 179 sleep 120; ./countdown 10
- 180 cd ..
- 181 cd kube3weeks/
- 182 ls
- 183 cd ..
- 184 git clone https://github.com/rook/rook.git
- 185 cd rook/deploy/examples/
- 186 ls
- 187 vim common.yaml
- 188 vim operator.yaml
- 189 cd ~/kube3weeks/
- 190 ls
- 191 vim cluster.yaml
- 192 lsblk
- 193 cd ../rook/deploy/examples/
- 194 kubectl create -f crds.yaml -f common.yaml -f operator.yaml
- 195 kubectl -n rook-ceph get all
- 196 kubectl create -f cluster.yaml
- 197 kubectl -n rook-ceph get all
- 198 vim ~/kube3weeks/storageclass.yaml
- 199 kubectl -n rook-ceph get all
- 200 kubectl -n rook-ceph get pods
- 201 kubectl create -f ~/kube3weeks/storageclass.yaml
- 202 kubectl get storageclass
- 203 kubectl create -f toolbox.yaml
- 204 kubectl -n rook-ceph exec -it rook-ceph-tools-d6d7c985c-6qk78 -- ceph status
- 205 kubectl get pv.pvc
- 206 kubectl get pv,pvc
- 207 kubectl -n rook-ceph exec -it rook-ceph-tools-d6d7c985c-6qk78 -- ceph status
- 208 kubectl create -f wordpress.yaml
- 209 kubectl get pv,pvc
- 210 kubectl delete -f wordpress.yaml
- 211 kubectl delete -f ~/kube3weeks/storageclass.yaml
- 212 exit
- 213 kubectl get hpa
- 214 kubectl get deploy php-apache
- 215 kubectl api-resources | less
- 216 cd kube3weeks/
- 217 ls
- 218 vim crd-object.yaml
- 219 kubectl create -f crd-object.yaml
- 220 kubectl api-resources | grep backup
- 221 vim crd-backup.yaml
- 222 kubectl create crd-backup.yaml
- 223 kubectl create -f crd-backup.yaml
- 224 kubectl get backups
- 225 cd
- 226 cd kube3weeks/
- 227 ls
- 228 kubectl create deploy old-nginx --image=nginx:1.14 --replicas=3 --dry-run=client -o yaml > oldnginx.yaml
- 229 vim oldnginx.yaml
- 230 kubectl create -f oldnginx.yaml
- 231 kubectl get all --selector type=canary
- 232 kubectl expose deploy old-nginx --name=oldnginx --port=80 --selector type=canary
- 233 kubectl get svc; kubectl get endpoints
- 234 kubectl get svc; kubectl get endpoints --selector type=canary
- 235 echo newdeploy > index.html
- 236 kubectl create cm canary --from-file=index.html
- 237 vim canary.yaml
- 238 kubectl create -f canary.yaml
- 239 kubectl get endpoints --selector type=canary
- 240 kubectl get svc
- 241 curl 10.98.181.145
- 242 kubectl get all --selector type=canary
- 243 kubectl scale deploy new-nginx --replicas=3
- 244 kubectl get all --selector type=canary
- 245 kubectl scale deploy old-nginx --replicas=0
- 246 kubectl get all --selector type=canary
- 247 exit
- 248 history
Add Comment
Please, Sign In to add comment