Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- student@student-virtual-machine:~/ckad$ history
- 1 cd ckad/
- 2 ./countdown 12
- 3 ./countdown 2
- 4 ./countdown 1
- 5 sudo apt install vim git -y
- 6 git clone https://github.com/sandervanvugt/ckad
- 7 cd ckad/
- 8 ls
- 9 ls *sh
- 10 ./minikube-docker-setup.sh
- 11 minikube start --memory=4G
- 12 kubectl get all
- 13 minikube status
- 14 minikube ssh
- 15 kubectl get all
- 16 kubectl create deployment firstnginx --image=nginx --replicas=3
- 17 kubectl get all
- 18 history
- 19 kubectl -h | less
- 20 kubectl completion -h | less
- 21 source <(kubectl completion bash)
- 22 history
- 23 cd ../.kube/
- 24 ls
- 25 less config
- 26 cd
- 27 kubectl config view
- 28 kubectl get pods
- 29 kubectl get pods -n kube-system
- 30 kubectl config set-context --current --namespace=kube-system
- 31 kubectl get pods
- 32 kubectl config set-context --current --namespace=default
- 33 kubectl config -h | less
- 34 kubectl config set-context -h | less
- 35 history
- 36 cd ckad/
- 37 ls
- 38 cd dockerfile/
- 39 ls
- 40 vim Dockerfile
- 41 docker build -t mymap .
- 42 docker images
- 43 docker build -h
- 44 docker save -h | less
- 45 docker images
- 46 docker save mymap
- 47 docker save mymap -o mymap.tar
- 48 cd
- 49 cd ckad/
- 50 history
- 51 kubectl get all
- 52 kubectl delete pod firstnginx-d8679d567-7zgv8
- 53 kubectl get all
- 54 kubectl run -h | less
- 55 kubectl run hazelcast --image=hazelcast/hazelcast --port=5701
- 56 kubectl get pods
- 57 kubectl describe pod hazelcast
- 58 history get pods
- 59 kubectl get pods
- 60 kubectl delete pod hazelcast
- 61 kubectl get all
- 62 kubectl get pods firstnginx-d8679d567-4gnkf -o yaml | less
- 63 kubectl describe pods firstnginx-d8679d567-4gnkf
- 64 kubectl run mypod --image=busybox
- 65 kubectl get pods
- 66 kubectl describe pod mypod | less
- 67 kubectl get pods mypod -o yaml | less
- 68 kubectl run --help | less
- 69 kubectl run yamginx --image=nginx --dry-run=client -o yaml
- 70 kubectl run yamginx --image=nginx --dry-run=client -o yaml > yamginx.yaml
- 71 vim yamginx.yaml
- 72 history
- 73 kubectl create deploy test --image=nginx --dry-run=client -o yaml
- 74 history
- 75 #kubectl create deploy mydb --image=mariadb
- 76 kubectl create deploy mydb --image=mariadb --dry-run=client -o yaml | less
- 77 vim yamginx.yaml
- 78 kubectl create -f yamginx.yaml
- 79 kubectl delete -f yamginx.yaml
- 80 kubectl apply -f yamginx.yaml
- 81 vim yamginx.yaml
- 82 kubectl apply -f yamginx.yaml
- 83 kubectl delete -f yamginx.yaml
- 84 kubectl apply -f yamginx.yaml
- 85 kubectl get pods
- 86 vim yamginx.yaml
- 87 kubectl describe pod yamginx
- 88 kubectl logs yamginx
- 89 history
- 90 vim sidecar.yaml
- 91 kubectl apply -f sidecar.yaml
- 92 kubectl exec -it sidecar-pod -- /bin/bash
- 93 kubectl exec -it sidecar-pod -c sidecar -- /bin/bash
- 94 vim sidecar.yaml
- 95 vim init-example1.yaml
- 96 kubectl apply -f init-example1.yaml
- 97 kubectl get pods
- 98 kubectl describe pod init-demo1
- 99 vim init-example2.yaml
- 100 kubectl apply -f init-example2.yaml
- 101 kubectl get pods
- 102 kubectl describe pod init-demo2
- 103 kubectl get ns
- 104 kubectl get pods -n default
- 105 kubectl get pods -n kube-system
- 106 kubectl describe ns default
- 107 history
- 108 kubectl get all -A
- 109 kubectl create ns secret
- 110 kubectl get ns
- 111 kubectl describe ns secret
- 112 vim busybox-ns.yaml
- 113 kubectl run pod busybox -- sleep 3600
- 114 kubectl run pod sleepyone --image=busybox -- sleep 3600
- 115 kubectl get pods
- 116 kubectl run secretginx --image=nginx -n secret
- 117 kubectl get pods
- 118 kubectl get pods -A
- 119 kubectl config set-context --current --namespace=secret
- 120 kubectl get pods
- 121 kubectl config set-context --current --namespace=default
- 122 history
- 123 kubectl run nginx-lab --image=nginx
- 124 kubectl get pods
- 125 kubectl describe pod pod
- 126 kubectl explain pods.spec | less
- 127 kubectl explain pods.spec.volumes | less
- 128 kubectl explain deploy.spec | less
- 129 kubectl get pods
- 130 kubectl exec -it mypod -- sh
- 131 kubectl exec -it yamginx -- sh
- 132 history
- 133 kubectl describe pod sidecar-pod | less
- 134 kubectl run faildb --image=mariadb
- 135 kubectl get pods
- 136 kubectl describe pod faildb | less
- 137 kubectl logs faildb
- 138 kubectl delete pod faildb
- 139 kubectl run --help | less
- 140 kubectl run successdb --image=mariadb --env=MARIADB_ROOT_PASSWORD=password
- 141 kubectl get pods
- 142 history
- 143 kubectl get pods
- 144 kubectl logs firstnginx-d8679d567-4gnkf
- 145 kubectl explain pod.spec | less
- 146 kubectl explain pod.spec.securityContext | less
- 147 kubectl explain pod.spec.containers.securityContext | less
- 148 vim securitycontextdemo2.yaml
- 149 kubectl apply -f securitycontextdemo2.yaml
- 150 kubectl get pods
- 151 kubectl exec -it security-context-demo -- sh
- 152 vim securitycontextdemo.yaml
- 153 kubectl apply -f securitycontextdemo.yaml
- 154 kubectl get pods
- 155 kubectl describe pod nginxsecure
- 156 history
- 157 kubectl delete all --all
- 158 sudo poweroff
- 159 history
- 160 minikube start
- 161 kubectl get all
- 162 source <(kubectl completion bash)
- 163 kubectl get all
- 164 kubectl get pods -A
- 165 kubectl explain jobs.spec
- 166 kubectl explain jobs.spec | less
- 167 kubectl create job -h | less
- 168 kubectl create job onejob --image=busybox -- date
- 169 kubectl get all
- 170 kubectl get jobs -o yaml | less
- 171 kubectl api-resources | less
- 172 kubectl create job another --image=busybox -- sleep 120
- 173 kubectl get jobs -o yaml | less
- 174 kubectl get jobs onejob -o yaml | grep restartP
- 175 kubectl get all
- 176 kubectl delete job onejob
- 177 kubectl get all
- 178 kubectl create job mynewjob --image=busybox --dry-run=client -o yaml -- sleep 5 > mynewjob.yaml
- 179 kubectl create job -h | less
- 180 vim mynewjob.yaml
- 181 kubectl apply -f mynewjob.yaml
- 182 kubectl explain --recursive jobs.spec
- 183 kubectl explain --recursive jobs.spec | grep -C 5 ttlSecondsA
- 184 vim mynewjob.yaml
- 185 kubectl apply -f mynewjob.yaml
- 186 kubectl get all
- 187 kubectl delete job another
- 188 kubectl get all
- 189 kubectl apply -f mynewjob.yaml
- 190 kubectl get all
- 191 kubectl create cronjob -h | less
- 192 kubectl explain cronjob.spec.schedule
- 193 kubectl create cronjob runme --image=busybox --schedule="*/1 * * * *" -- echo greetings from the cluster
- 194 kubectl get all
- 195 kubectl logs pod/runme-28494093-r2sjw
- 196 kubectl delete cronjobs.batch runme
- 197 kubectl create cronjob -h | less
- 198 kubectl create cronjob hellojob --image=busybox --schedule="*/4 * * * *" -- echo hello world
- 199 cd ckad/
- 200 ls
- 201 cd labs
- 202 ls
- 203 ./ckad-lab5-grade.sh
- 204 kubectl explain pods.spec.containers.resources
- 205 kubectl create ns limited
- 206 kubectl describe ns limited
- 207 kubectl create quota -h | less
- 208 #kubectl create quota my-quota --hard=cpu=1,memory=1G,pods=2,services=3,replicationcontrollers=2,resourcequotas=1,secrets=5,persistentvolumeclaims=10
- 209 kubectl create quota limited-quota --hard=memory=1G,pods=3
- 210 kubectl describe ns limited
- 211 kubectl create deploy testing --image=nginx --replicas=5
- 212 kubectl get all
- 213 kubectl describe deploy testing
- 214 kubectl get all
- 215 kubectl describe replicasets.apps testing-748d4566d5
- 216 kubectl describe ns default
- 217 kubectl get quota
- 218 kubectl delete quota limited-quota
- 219 kubectl get all
- 220 kubectl scale deployment testing --replicas 4
- 221 kubectl get all
- 222 history
- 223 kubectl create quota limited-quota --hard=memory=1G,pods=3 -n limited
- 224 kubectl get ns limited
- 225 kubectl describe ns limited
- 226 kubectl create deploy another --image=nginx --replicas=5
- 227 kubectl delete deploy another
- 228 kubectl create deploy another --image=nginx --replicas=5 -n limited
- 229 kubectl get all -n limited
- 230 kubectl describe -n limited replicaset another-664d446fc6
- 231 kubectl set resources -h | less
- 232 #kubectl set resources deployment nginx --limits=cpu=200m,memory=512Mi --requests=cpu=100m,memory=256Mi
- 233 kubectl get all -n limited
- 234 kubectl set -n limited resources deployment another --limits=memory=256Mi
- 235 kubectl get all -n limited
- 236 kubectl describe ns limited
- 237 history
- 238 kubectl get all -n limited
- 239 kubectl get pods -n limited another-5749bcc7dd-6nqcc
- 240 kubectl get pods -n limited another-5749bcc7dd-6nqcc -o yaml
- 241 history
- 242 kubectl get services
- 243 cd ..
- 244 vim busybox-ready.yaml
- 245 kubectl apply -f busybox-ready.yaml
- 246 kubectl get pods
- 247 kubectl describe pod busybox-ready
- 248 kubectl edit pods busybox-ready
- 249 kubectl exec -it busybox-ready -- sh
- 250 kubectl get pods
- 251 vim nginx-probes.yaml
- 252 kubectl apply -f nginx-probes.yaml
- 253 kubectl get pods
- 254 kubectl create deploy myweb --image=nginx --replicas=3
- 255 kubectl get all
- 256 kubectl describe deployments.apps myweb
- 257 kubectl get all --selector app=myweb
- 258 kubectl delete pod myweb-9794cbc77-85rd4
- 259 kubectl get all --selector app=myweb
- 260 kubectl run mypod --image=nginx
- 261 kubectl get all
- 262 kubectl delete pod mypod
- 263 kubectl get all
- 264 kubectl apply -f redis-deploy.yaml
- 265 vim redis-deploy.yaml
- 266 kubectl api-resources | less
- 267 vim redis-deploy.yaml
- 268 kubectl apply -f redis-deploy.yaml
- 269 history
- 270 kubectl get all
- 271 kubectl delete cronjobs.batch hellojob
- 272 kubectl edit deployments.apps redis
- 273 kubectl get all
- 274 kubectl delete rs
- 275 kubectl delete rs redis-65fbbd8f94
- 276 kubectl get all
- 277 history
- 278 kubectl create deploy nginxup --image=nginx:1.14
- 279 kubectl get all --selector app=nginxup
- 280 kubectl scale deployment nginxup --replicas=3
- 281 kubectl get all --selector app=nginxup
- 282 kubectl set image deploy nginxup nginx=nginx:1.17
- 283 kubectl get all --selector app=nginxup
- 284 kubectl get pods --show-labels
- 285 kubectl get pods myweb-9794cbc77-h45br -o yaml | less
- 286 kubectl get deploy redis -o yaml | less
- 287 kubectl create deploy bluelabel --image=nginx
- 288 kubectl label deploy bluelabel state=demo
- 289 kubectl get deploy --show-labels
- 290 kubectl get all --selector state=demo
- 291 kubectl get all --selector app=bluelabel
- 292 kubectl get deploy bluelabel -o yaml | less
- 293 kubectl describe pod bluelabel-59d6bcf7ff-p9h5p -o yaml | less
- 294 kubectl describe pod bluelabel-59d6bcf7ff-p9h5p
- 295 kubectl label pod bluelabel-59d6bcf7ff-p9h5p app-
- 296 kubectl get pods | grep blue
- 297 kubectl get pods --show-labels | grep blue
- 298 history
- 299 kubectl get deploy -o yaml
- 300 kubectl get deploy bluelabel -o yaml
- 301 kubectl scale deploy bluelabel --replicas=4
- 302 kubectl get all --selector app=bluelabel
- 303 kubectl set env deploy bluelabel type=blended
- 304 kubectl get all --selector app=bluelabel
- 305 vim rolling.yaml
- 306 kubectl apply -f rolling.yaml
- 307 kubectl rollout history deployment
- 308 kubectl edit deployments.apps rolling-nginx
- 309 kubectl rollout history deployment
- 310 kubectl describe deployments.apps rolling-nginx
- 311 kubectl rollout history deployment rolling-nginx --revision=2
- 312 kubectl rollout history deployment rolling-nginx --revision=1
- 313 kubectl rollout undo deployment rolling-nginx --to-revision=1
- 314 kubectl get all
- 315 kubectl delete all --all
- 316 kubectl create deploy nginxsvc --image=nginx
- 317 kubectl get all
- 318 kubectl scale deploy nginxsvc --replicas=3
- 319 kubectl expose deploy nginxsvc --port=80
- 320 kubectl get all
- 321 kubectl describe svc nginxsvc
- 322 kubectl get pods -o wide
- 323 kubectl get endpoints
- 324 kubectl get svc
- 325 curl 10.101.243.185
- 326 minikube ssh
- 327 kubectl edit svc nginxsvc
- 328 kubectl get svc
- 329 minikube ip
- 330 curl 192.168.49.2:32519
- 331 history
- 332 kubectl get svc
- 333 kubectl get all -n kube-system
- 334 kubectl get pods -o wide -n kube-system
- 335 kubectl get endpoints -A
- 336 kubectl run testpod --image=busybox -- sleep 3600
- 337 kubectl create ns other
- 338 kubectl run newginx --image=nginx -n other
- 339 kubectl expose pod -n other newginx --port=80
- 340 kubectl get svc -A
- 341 kubectl get svc,pods -n kube-system
- 342 kubectl get svc
- 343 kubectl exec -it testpod -- cat /etc/resolv.conf
- 344 kubectl exec -it testpod -- nslookup nginxsvc
- 345 kubectl exec -it testpod -- nslookup newginx
- 346 kubectl get svc -A
- 347 kubectl exec -it testpod -- nslookup newginx.other.svc.cluster.local
- 348 history
- 349 kubectl get svc
- 350 kubectl get svc -A
- 351 vim nwpolicy-complete-example.yaml
- 352 kubectl apply -f nwpolicy-complete-example.yaml
- 353 kubectl expose pod nginx --port=80
- 354 kubectl exec -it busybox -- wget --spider --timeout=1 nginx
- 355 kubectl get pods --show-labels
- 356 kubectl describe networkpolicies.networking.k8s.io
- 357 minikube addons list
- 358 kubectl get all -n kube-system
- 359 kubectl get ns
- 360 kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
- 361 kubectl get pods -A
- 362 kubectl exec -it busybox -- wget --spider --timeout=1 nginx
- 363 minikube stop
- 364 minikube start
- 365 kubectl exec -it busybox -- wget --spider --timeout=1 nginx
- 366 kubectl get pods
- 367 kubectl get networkpolicy
- 368 kubectl get pods
- 369 kubectl apply -f nwpolicy-complete-example.yaml
- 370 kubectl exec -it busybox -- wget --spider --timeout=1 nginx
- 371 minikube stop
- 372 minikube start --cni=calico
- 373 kubectl get ns
- 374 kubectl get pods -n kube-system
- 375 kubectl exec -it busybox -- wget --spider --timeout=1 nginx
- 376 kubectl delete -f nwpolicy-complete-example.yaml
- 377 kubectl all
- 378 kubectl get all
- 379 kubectl apply -f nwpolicy-complete-example.yaml
- 380 kubectl get svc
- 381 kubectl describe svc nginx
- 382 kubectl exec -it busybox -- wget --spider --timeout=1 nginx
- 383 kubectl edit svc nginxsvc
- 384 history
Advertisement
Add Comment
Please, Sign In to add comment