Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- student@student-virtual-machine:~$ history
- 1 sudo apt install git vim -y
- 2 git clone https://github.com/sandervanvugt/ckad
- 3 cd ckad
- 4 ls
- 5 ./minikube-docker-setup.sh
- 6 minikube start --vm-driver=docker
- 7 history
- 8 ls
- 9 minikube status
- 10 minikube dashboard
- 11 kubectl get all
- 12 curl 10.99.11.196
- 13 minikube ssh
- 14 ls
- 15 kubectl version
- 16 ls
- 17 ./countdown 13
- 18 kubectl api-resources | less
- 19 kubectl get all
- 20 kubectl get pods -o wide
- 21 kubectl delete pod removemeginx-b4b69d8d7-qkmmp
- 22 kubectl get all
- 23 kubectl api-versions
- 24 minikube ssh
- 25 kubectl --v=10 get pods
- 26 kubectl proxy --port=8001 &
- 27 curl http://localhost:8001/version
- 28 curl http://localhost:8001/api/v1/namespaces/default/pods
- 29 curl http://localhost:8001/api/v1/namespaces/default/pods/removemeginx-b4b69d8d7-4mds4
- 30 curl -XDELETE http://localhost:8001/api/v1/namespaces/default/pods/removemeginx-b4b69d8d7-4mds4
- 31 kubectl get pods
- 32 kubectl -h
- 33 kubectl -h | less
- 34 kubectl create -h | less
- 35 kubectl create serviceaccount -h | less
- 36 kubectl completion -h
- 37 source <(kubectl completion bash)
- 38 kubectl config view
- 39 cd ~/.kube/c
- 40 cd ~/.kube/
- 41 vim config
- 42 cd -
- 43 history; sleep 2; ./countdown 12
- 44 history; sleep 120; ./countdown 10
- 45 kubectl get pods
- 46 kubectl run -h | less
- 47 kubectl run ghost --image=ghost:0.9
- 48 kubectl get pods
- 49 kubectl describe pod ghost
- 50 kubectl get pods ghost
- 51 kubectl get pods ghost -o yaml | less
- 52 kubectl get pods
- 53 kubectl delete pod ghost
- 54 kubectl get pods
- 55 kubectl explain pods
- 56 kubectl explain pods.spec
- 57 kubectl explain pods.spec.containers
- 58 kubectl explain --recursive pods.spec | less
- 59 history
- 60 kubectl run ghost --image=ghost:0.9 --dry-run=client -o yaml > myghost.yaml
- 61 vim myghost.yaml
- 62 kubectl api-resources | less
- 63 vim myghost.yaml
- 64 kubectl create -f myghost.yaml
- 65 vim myghost.yaml
- 66 kubectl apply -f myghost.yaml
- 67 kubectl replace -f myghost.yaml
- 68 kubectl get pods
- 69 history
- 70 kubectl delete -f myghost.yaml
- 71 vim myghost.yaml
- 72 kubectl apply -f myghost.yaml
- 73 vim myghost.yaml
- 74 kubectl apply -f myghost.yaml
- 75 ./countdown 10
- 76 vim sidecar.yaml
- 77 kubectl create -f sidecar.yaml
- 78 kubectl exec -it sidecar-pod -c sidecar /bin/bash
- 79 vim morevolumes.yaml
- 80 vim initpod.yaml
- 81 kubectl create -f initpod.yaml
- 82 kubectl get pods
- 83 kubectl delete -f initpod.yaml
- 84 vim initpod.yaml
- 85 kubectl create -f initpod.yaml
- 86 kubectl get pods
- 87 vim sidecar.yaml
- 88 kubectl run mydb --image=mariadb
- 89 kubectl get all
- 90 kubectl describe pod mydb
- 91 kubectl logs mydb
- 92 kubectl delete pod mydb
- 93 kubectl run -h | less
- 94 kubectl run mydb --image=mariadb --env=MARIADB_ROOT_PASSWORD=password
- 95 kubectl get pods
- 96 kubectl exec -it mydb -- sh
- 97 history
- 98 sudo poweroff
- 99 ip a
- 100 minikube start
- 101 history
- 102 kubectl explain pod.spec.securityContext
- 103 kubectl explain pod.spec.containers.spec.securityContext
- 104 kubectl explain pod.spec.containers.securityContext
- 105 history
- 106 kubectl explain --recursive pod.spec | less
- 107 cd ckad/
- 108 vim securitycontextdemo2.yaml
- 109 kubectl apply -f securitycontextdemo2.yaml
- 110 kubectl get pods
- 111 source <(kubectl completion bash)
- 112 kubectl exec -it securitycontextdemo -- sh
- 113 kubectl get pods
- 114 kubectl exec -it security-context-demo -- sh
- 115 kubectl apply -f securitycontextdemo2.yaml
- 116 vim securitycontextdemo2.yaml
- 117 vim securitycontextdemo.yaml
- 118 kubectl create -f securitycontextdemo.yaml
- 119 kubectl get pods
- 120 kubectl describe nginxsecure
- 121 kubectl describe pod nginxsecure
- 122 kubectl get all
- 123 kubectl delete all --all
- 124 kubectl create -h | less
- 125 kubectl create job -h | less
- 126 kubectl create job my-job --image=busybox -- date --dry-run=client -o yaml
- 127 kubectl create job my-job --image=busybox --dry-run=client -o yaml -- date
- 128 vim simplejob.yaml
- 129 kubectl create -f simplejob.yaml
- 130 kubectl get all
- 131 kubectl delete job/my-job
- 132 kubectl get all
- 133 kubectl get jobs simple-job -o yaml
- 134 kubectl delete jobs.batch simple-job
- 135 vim simplejob.yaml
- 136 kubectl create -f simplejob.yaml
- 137 kubectl get all
- 138 kubectl delete jobs.batch simple-job
- 139 vim simplejob.yaml
- 140 kubectl create -f simplejob.yaml
- 141 kubectl get all
- 142 vim simplejob.yaml
- 143 kubectl get all
- 144 kubectl explain CronJob.spec | less
- 145 kubectl create -h | less
- 146 kubectl create cronjob -h | less
- 147 vim cron-example.yaml
- 148 kubectl create -f cron-example.yaml
- 149 kubectl get cronjobs.batch hello
- 150 kubectl get cronjobs
- 151 kubectl get jobs --watch
- 152 kubectl get all
- 153 kubectl logs hello-27236922--1-g9f57
- 154 kubectl delete cronjob hello
- 155 kubectl create cronjob -h | less
- 156 # kubectl create cronjob my-job --image=busybox --schedule="*/1 * * * *" -- date
- 157 kubectl create cronjob my-job --image=busybox --schedule="*/5 * * * *" -- logger hello world
- 158 kubectl get all
- 159 kubectl get ns
- 160 kubectl get all
- 161 kubectl get all -A
- 162 kubectl get all -n kube-system
- 163 kubectl get all -A
- 164 kubectl create ns secret
- 165 vim busybox-ns.yaml
- 166 kubectl run -h | less
- 167 kubectl run busybox -n secret -- sleep 1800
- 168 kubectl run sleepubox --image=busybox -n secret -- sleep 1800
- 169 kubectl get all
- 170 kubectl get pods -n secret
- 171 kubectl config set-context --current -n secret
- 172 kubectl config set-context --current --namespace=secret
- 173 kubectl get pods
- 174 kubectl config set-context --current --namespace=default
- 175 ./countdown 12
- 176 kubectl delete --help | less
- 177 kubectl get pods -A
- 178 kubectl delete all --all
- 179 kubectl get pods -A
- 180 vim frontend-resources.yaml
- 181 kubectl create -f frontend-resources.yaml
- 182 kubectl get all
- 183 kubectl describe pod frontend
- 184 kubectl edit pod frontend
- 185 kubectl delete pod frontend --grace-period=0 --force
- 186 kubectl get all
- 187 vim frontend-resources.yaml
- 188 kubectl create -f frontend-resources.yaml
- 189 kubectl get pods
- 190 kubectl run --help | less
- 191 kubectl run myserver --image=nginx --limits="memory=512M"
- 192 kubectl explain deployment.spec
- 193 kubectl explain deployment.spec.strategy
- 194 kubectl explain deployment.spec.strategy.rollingUpdate
- 195 kubectl create deployment nginxblah --image=nginx
- 196 kubectl get all
- 197 kubectl scale deployment nginxblah --replicas=3
- 198 kubectl get all
- 199 kubectl delete pod nginxblah-7dc7fb8c85-2hhj6
- 200 kubectl get pods
- 201 kubectl get deployments.apps nginxblah -o yaml | less
- 202 kubectl get all --show-labels
- 203 kubectl get all --selector app=nginxblah
- 204 kubectl get all --show-labels
- 205 kubectl label pod nginxblah-7dc7fb8c85-zqgbk app-
- 206 kubectl get all --show-labels
- 207 kubectl get deployments.apps nginxblah -o yaml | less
- 208 kubectl edit deployments.apps nginxblah
- 209 kubectl get all
- 210 vim redis-deploy.yaml
- 211 kubectl create -f redis-deploy.yaml
- 212 kubectl api-versions | less
- 213 vim redis-deploy.yaml
- 214 kubectl create -f redis-deploy.yaml
- 215 kubectl scale deployment redis --replicas=2
- 216 kubectl get all
- 217 kubectl delete rs redis-6fb5b985bc
- 218 history
- 219 kubectl get all
- 220 kubectl delete deployments.apps redis
- 221 kubectl explain replicaset.spec
- 222 kubectl explain deployment.spec
- 223 ./countdown 60
- 224 kubectl create deployment nginx-lab7 --image=nginx --replicas=3
- 225 ./countdown 13
- 226 cd ..
- 227 https://github.com/cncf/curriculum
- 228 git clone https://github.com/cncf/curriculum
- 229 cd ckad/
- 230 vim rolling.yaml
- 231 kubectl create -f rolling.yaml
- 232 kubectl rollout history deployment
- 233 kubectl edit deployments.apps rolling-nginx
- 234 kubectl get all
- 235 kubectl rollout history deployment
- 236 kubectl describe deployments.apps rolling-nginx
- 237 kubectl rollout history deployment rolling-nginx --revision=2
- 238 kubectl rollout history deployment rolling-nginx --revision=1
- 239 kubectl rollout undo deployment rolling-nginx --to-revision=1
- 240 kubectl get all
- 241 kubectl get deploy --show-labels
- 242 kubectl create deploy nginxsvc --image=nginx --replicas=3
- 243 kubectl get all --selector app=nginxsvc
- 244 kubectl expose deployment nginxsvc
- 245 kubectl expose deployment nginxsvc --port=80
- 246 kubectl get all --selector app=nginxsvc
- 247 kubectl get endpoint
- 248 kubectl get endpoints
- 249 curl 10.107.210.223
- 250 minikube ssh
- 251 kubectl edit svc nginxsvc
- 252 kubectl get svc
- 253 minikube ip
- 254 curl http://$(minikube ip):32000
- 255 ./countdown 12
- 256 kubectl get svc
- 257 kubectl get svc nginxsvc
- 258 kubectl get svc nginxsvc -o yaml
- 259 kubectl get pods -n kube-system
- 260 vim busybox.yaml
- 261 kubectl create -f busybox.yaml
- 262 kubectl get svc
- 263 kubectl exec -it busybox2 -- nslookup nginxsvc
- 264 minikube addons list
- 265 minikube addons enable ingress
- 266 kubect get all --selector app=nginxsvc
- 267 kubectl get all --selector app=nginxsvc
- 268 curl http://$(minikube ip):32000
- 269 vim nginxsvc-ingress.yaml
- 270 kubectl apply -f nginxsvc-ingress.yaml
- 271 kubectl get ingress
- 272 sudo vim /etc/hosts
- 273 minikube ip
- 274 cat /etc/hosts
- 275 kubectl get ingress
- 276 curl nginxsvc.info
- 277 kubectl get ingress
- 278 kubectl get ingress -o yaml
- 279 kubectl describe ingress nginxsvc-ingress
- 280 kubectl create deployment newdep --image=gcr.io/google-samples/hello-app:2.0
- 281 kubectl get deploy
- 282 kubectl expose deployment newdep --port=8080
- 283 kubectl describe ingress nginxsvc-ingress
- 284 curl nginxsvc.info/hello
- 285 history
- 286 sudo poweroff
- 287 minikube status
- 288 minikube start
- 289 history
- 290 kubectl get all -n kube-system
- 291 cd ckad/
- 292 vim nwpolicy-complete-example.yaml
- 293 kubectl apply -f nwpolicy-complete-example.yaml
- 294 kubectl get all
- 295 kubectl expose pod nginx --port=80
- 296 kubectl exec -it busybox -- wget --spider --timeout=1 nginx
- 297 kubectl label pod busybox access=true
- 298 kubectl exec -it busybox -- wget --spider --timeout=1 nginx
- 299 kubectl explain pod.spec.volumes | less
- 300 kubectl delete all --all
- 301 vim morevolumes.yaml
- 302 kubectl create -f morevolumes.yaml
- 303 kubectl exec -it morevol2 -c centos1 -- touch /centos1/c1-file
- 304 kubectl exec -it morevol2 -c centos2 -- ls /centos2/
- 305 ls
- 306 vim pv.yaml
- 307 kubectl create -f pv.yaml
- 308 kubectl get pv
- 309 vim pvc.yaml
- 310 kubectl create -f pvc.yaml
- 311 kubectl get all
- 312 kubectl get pvc
- 313 kubectl get pv
- 314 kubectl get storageclass
- 315 ls
- 316 vim pv-pod.yaml
- 317 kubectl create -f pv-pod.yaml
- 318 kubectl exec -it pv-pod -- touch /usr/share/nginx/hello
- 319 kubectl create -f pv-pod.yaml
- 320 vim pv-pod.yaml
- 321 kubectl exec -it pv-pod -- touch /usr/share/nginx/html/hello
- 322 kubectl get pv
- 323 kubectl describe pv pvc-e694a8b6-0bb8-426c-9003-6c2f90a3937e
- 324 minikube ssh
- 325 vim pv-pvc-pod.yaml
- 326 kubectl create -f pv-pvc-pod.yaml
- 327 kubectl delete -f pv-pvc-pod.yaml
- 328 kubectl create ns myvol
- 329 kubectl create -f pv-pvc-pod.yaml
- 330 kubectl get pv
- 331 kubectl create -h
- 332 vim variables
- 333 kubectl create cm variables --from-env-file=variables
- 334 source <(kubectl completion bash)
- 335 kubectl describe cm/variables
- 336 vim cm-test-pod.yaml
- 337 kubectl create -f cm-test-pod.yaml
- 338 kubectl logs pod/test1
- 339 kubectl create cm morevars --from-literal=VAR3=giat --from-literal=VAR4=horse
- 340 kubectl describe configmaps morevars
- 341 vim nginx-custom-config.conf
- 342 kubectl create cm --help | less
- 343 kubectl create cm nginx-cm --from-file=nginx-custom-config.conf
- 344 kubectl describe cm nginx-cm
- 345 vim nginx-cm.yml
- 346 kubectl create -f nginx-cm.yml
- 347 kubectl exec -it nginx-cm -- cat /etc/nginx/conf.d/default.conf
- 348 kubect create deploy mydb --image=mariadb --replicas=3
- 349 kubectl create deploy mydb --image=mariadb --replicas=3
- 350 kubectl get pods
- 351 kubectl describe pods mydb-6875fcdfbd-5wr4v
- 352 kubectl logs mydb-6875fcdfbd-l2wdm
- 353 kubectl get all --selector app=mydb
- 354 kubectl set env -h | less
- 355 kubectl create cm mydbvars --from-literals=MYSQL_ROOT_PASSWORD=password
- 356 kubectl create cm mydbvars --from-literal=MYSQL_ROOT_PASSWORD=password
- 357 kubectl describe cm mydbvars
- 358 kubectl set env --from-configmap/mydbvars deploy/mydb
- 359 kubectl set env --fromconfigmap/mydbvars deploy/mydb
- 360 kubectl set env --help | less
- 361 kubectl set env --from=configmap/mydbvars deploy/mydb
- 362 kubectl get all --selector app=mydb
- 363 kubectl get deploy mydb -o yaml | less
- 364 kubectl get deploy mydb -o yaml > mydb.yaml
- 365 vim mydb.yaml
- 366 kubectl get pods
- 367 kubectl describe pod test1
- 368 kubectl get pods test1 -o yaml | less
- 369 ./countdown 14
- 370 sudo poweroff
- 371 minikube start
- 372 kubectl get pods
- 373 source <(kubectl completion bash)
- 374 kubectl describe pod morevol2
- 375 kubectl get pods
- 376 kubectl describe test1
- 377 kubectl describe pod test1
- 378 sudo reboot
- 379 ping nu.nl
- 380 ping 8.8.8.8
- 381 ip a
- 382 ip link set ens33 up
- 383 sudo ip link set ens33 up
- 384 ip a
- 385 sudo dhclient
- 386 history
- 577 ssh-keygen; kubectl create secret generic my-secret --from-file=ssh-private-key=/home/student/.ssh/id_rsa --from-literal=passphrase=password
- 578 source <(kubectl completion bash)
- 579 kubectl describe secrets my-secret
- 580 kubectl get secret my-secret -o yaml
- 581 echo cGFzc3dvcmQ= | base64 -d
- 582 kubectl create secret generic secretstuff --from-literal=password=passwod --from-literal=user=linda
- 583 cd ckad/
- 584 vim pod-secret.yaml
- 585 kubectl create -f pod-secret
- 586 kubectl create -f pod-secret.yaml
- 587 kubectl describe pod secretbox2
- 588 kubectl exec -it secretbox2 -- /bin/sh
- 589 vim pod-secret.yaml
- 590 kubectl create secret generic mysql --from-literal=passsword=root
- 591 kubectl get secrets mysql -o yaml
- 592 vim pod-secret-as-var.yaml
- 593 kubectl create -f pod-secret-as-var.yaml
- 594 kubectl exec -it mymysql -- /bin/bash
- 595 kubectl get pods
- 596 kubectl describe pod mymysql
- 597 kubectl describe secrets mysql
- 598 kubectl delete -f pod-secret-as-var.yaml
- 599 vim pod-secret-as-var.yaml
- 600 kubectl create -f pod-secret-as-var.yaml
- 601 kubectl get pods
- 602 kubectl exec -it mymysql -- /bin/bash
- 603 ./countdown 14
- 604 history
- student@machine3:~/ckad$ history
- 1 minikube start --vm-driver=docker
- 2 kubectl create deploy newginx --image=nginx --replicas=3
- 3 source <(kubectl completion bash)
- 4 kubectl get pod newginx-645dff97c6-wlw5l -o yaml | less
- 5 vim mypod.yaml
- 6 kubectl apply -f mypod.yaml
- 7 kubectl get pods mypod -o yaml | less
- 8 kubectl exec -it mypod -- sh
- 9 vim mysa.yaml
- 10 kubectl apply -f mysa.yaml
- 11 vim list-pods.yaml
- 12 kubectl create -f list-pods.yaml
- 13 kubectl get roles -o yaml
- 14 vim list-pods-mysa-binding.yaml
- 15 kubectl create -f list-pods-mysa-binding.yaml
- 16 vim mysapod.yaml
- 17 kubectl apply -f mysapod.yaml
- 18 kubectl exec -it mypod -- sh
- 19 kubectl exec -it mysapod -- sh
- 20 vim cm-test-pod.yaml
- 21 kubectl create cm variables --from-file=variables
- 22 kubectl create -f cm-test-pod.yaml
- 23 kubectl get pods
- 24 kubectl describe po test1
- 25 kubectl logs test1
- 26 vim cm-test-pod.yaml
- 27 kubectl apply -f cm-test-pod.yaml
- 28 kubectl delete pod test1
- 29 kubectl apply -f cm-test-pod.yaml
- 30 kubectl get pods
- 31 vim busybox-ready.yaml
- 32 kubectl create -f busybox-ready.yaml
- 33 kubectl get pods
- 34 kubectl edit pods busybox-ready
- 35 kubectl exec -it busybox-ready -- /bin/sh
- 36 kubectl get pods
- 37 vim nginx-probes.yaml
- 38 kubectl create -f nginx-probes.yaml
- 39 kubectl get pods
- 40 cd
- 41 wget https://get.helm.sh/helm-v3.0.0-linux-amd64.tar.gz
- 42 tar -xvf helm-v3.0.0-linux-amd64.tar.gz
- 43 sudo cp linux-amd64/helm /usr/bin
- 44 helm --help
- 45 helm search --help
- 46 helm search hub --help
- 47 helm search hub database
- 48 helm repo add stable https://charts.helm/sh/stable
- 49 helm repo add stable https://charts.helm.sh/stable
- 50 help repo update
- 51 helm repo update
- 52 kubectl get all
- 53 helm --debug install mydb myrepo/mariadb --set master.persistence.enabled=false --set slave.persistence.enabled=false
- 54 helm --debug install mydb mariadb --set master.persistence.enabled=false --set slave.persistence.enabled=false
- 55 helm repo --help | less
- 56 helm repo list
- 57 helm --debug install mydb stable/mariadb --set master.persistence.enabled=false --set slave.persistence.enabled=false
- 58 kubectl get all
- 59 cd ckad/
- 60 ls
- 61 ./countdown 12
- 62 git pull
- 63 ls
- 64 cd my-ghost-app/
- 65 cat Chart.yaml
- 66 ls
- 67 cat templates/deployment.yaml
- 68 cat templates/service.yaml
- 69 cat values.yaml
- 70 cd ..
- 71 helm template --debug my-ghost-app
- 72 helm install -f my-ghost-app/values.yaml my-ghost-app my-ghost-app/
- 73 kubectl get all
- 74 kubectl create deployment old-nginx --image=nginx:1.14 --replicas=3 --dry-run=client -o yaml > ../oldnginx.yaml
- 75 vim ../oldnginx.yaml
- 76 kubectl create -f ../oldnginx.yaml
- 77 kubectl get all --selector type=canary
- 78 kubectl expose deploy old-nginx --name=oldnginx --port=80 --selector type=canary
- 79 kubectl get svc oldnginx -o yaml
- 80 kubectl get endpoints
- 81 minikube ssh
- 82 kubectl get svc
- 83 minikube ssh
- 84 cd ..
- 85 kubectl cp old-nginx-5b4869b6fd-xxhct:/usr/share/nginx/html/index.html
- 86 kubectl cp old-nginx-5b4869b6fd-xxhct:/usr/share/nginx/html/index.html index.html
- 87 vim index.html
- 88 kubectl create cm canary --from-file=index.html
- 89 kubectl describe cm canary
- 90 cd ckad/
- 91 ls
- 92 git pull
- 93 vim canary.yaml
- 94 kubectl create -f canary.yaml
- 95 kubectl get endpoints
- 96 kubectl get svc
- 97 minikube ssh
- 98 kubectl get deploy
- 99 kubectl scale deployment new-nginx --replicas=3
- 100 kubectl scale deploy old-nginx --replicas=0
- 101 kubectl get deploy
- 102 history
Add Comment
Please, Sign In to add comment