Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- student@student-virtual-machine:~/ckad$ history
- 1 sudo apt install -y git
- 2 git clone https://github.com/sandervanvugt/ckad
- 3 cd ckad
- 4 ls
- 5 minikube start --vm-driver=docker --cni=calico
- 6 ls
- 7 history
- 8 kubectl get all
- 9 minikube ssh
- 10 kubectl get all
- 11 kubectl create deployment firstningx --image=nginx
- 12 kubectl get all
- 13 ./countdown 13
- 14 kubectl -h
- 15 kubectl create -h | less
- 16 kubectl create deployment -h | less
- 17 kubectl completion -h | less
- 18 source <(kubectl completion bash)
- 19 kubectl get all
- 20 history
- 21 cd
- 22 cd .kube/
- 23 ls
- 24 less config
- 25 kubectl config view
- 26 cd
- 27 cd ckad/
- 28 l
- 29 cd dockerfile/
- 30 ls
- 31 vim Dockerfile
- 32 sudo apt install -y vim
- 33 nano Dockerfile
- 34 docker build -t helloworld .
- 35 docker images
- 36 docker run helloworld
- 37 docker save helloworld halloworld.tar
- 38 docker save helloworld
- 39 docker save helloworld -o helloworld.tar
- 40 ls -l helloworld.tar
- 41 kubectl run -h | less
- 42 kubectl run mynginx --image=nginx
- 43 kubectl get pods
- 44 kubectl get pods mynginx -o yaml | less
- 45 kubectl describe pod mynginx | less
- 46 history
- 47 kubectl get pods
- 48 kubectl describe pod mybb
- 49 echo BONUSLAB: start busybox as a pod and make sure it runs the command "sleep 3600" while starting
- 50 kubectl run -h | less
- 51 kubectl run sleepybox --image=busybox -- sleep 3600
- 52 kubectl get pods
- 53 kubectl delete pod mybb
- 54 history
- 55 kubectl run bbox --image=busybox
- 56 kubectl get pods
- 57 kubectl run -h | less
- 58 kubectl run gobox --image=busybox --restart=never
- 59 kubectl run -h | less
- 60 kubectl run gobox --image=busybox --restart=Never
- 61 kubectl get pods
- 62 kubectl get pods gobox -o yaml | less
- 63 kubectl get pods bbox -o yaml | less
- 64 history
- 65 kubectl get pods bbox -o yaml | less
- 66 ls
- 67 cd ..
- 68 ls
- 69 kubectl run mynginx --image=nginx --dry-run=client -o yaml
- 70 kubectl run mynginx --image=nginx --dry-run=client -o yaml > mynginx.yaml
- 71 vim mynginx.yaml
- 72 kubectl explain pods
- 73 kubectl explain pods.spec | less
- 74 vim mynginx.yaml
- 75 kubectl create -f mynginx.yaml
- 76 kubectl delete pod mynginx
- 77 kubectl create -f mynginx.yaml
- 78 kubectl delete -f mynginx.yaml
- 79 kubectl apply -f mynginx.yaml
- 80 vim mynginx.yaml
- 81 kubectl apply -f mynginx.yaml
- 82 vim mynginx.yaml
- 83 kubectl apply -f mynginx.yaml
- 84 vim mynginx.yaml
- 85 kubectl replace -f mynginx.yaml
- 86 history
- 87 kubectl run bbbox --image=busybox -- sleep 3600 --dry-run=client -o yaml
- 88 kubectl get pods
- 89 kubectl describe pods bbbox
- 90 kubectl logs bbbox
- 91 kubectl delete pods bbbox
- 92 kubectl run bbbox --image=busybox --dry-run=client -o yaml -- sleep 2600
- 93 history
- 94 history | grep git
- 95 vim sidecar.yaml
- 96 kubectl apply -f sidecar.yaml
- 97 kubectl get pods
- 98 kubectl exec -it sidecar-pod -c sidecar -- /bin/bash
- 99 vim init-example1.yaml
- 100 kubectl apply -f init-example1.yaml
- 101 kubectl get pods
- 102 kubectl describe pod init-demo1
- 103 vim init-example2.yaml
- 104 kubectl apply -f init-example2.yaml
- 105 kubectl get pods
- 106 vim init-example2.yaml
- 107 history
- 108 kubectl get pods
- 109 kubectl get pods -A
- 110 kubectl get all
- 111 kubectl get all -A
- 112 kubectl get ns
- 113 kubectl create ns secret
- 114 kubectl get ns
- 115 kubectl run pod busybox -n secret -- sleep infinity
- 116 kubectl run pod --image=busybox secretbox -n secret -- sleep infinity
- 117 kubectl get all
- 118 kubectl get all -n secret
- 119 kubectl get pods
- 120 kubectl config set-context --current -n secret
- 121 kubectl config set-context --current --namespace=secret
- 122 kubectl get pods
- 123 kubectl config set-context --current -ns default
- 124 kubectl config set-context --current --namespace=default
- 125 kubectl get pods
- 126 kubectl config set-context -h | less
- 127 kubectl describe ns secret
- 128 kubectl get pods
- 129 kubectl exec -it bbox -- sh
- 130 kubectl exec -it sleepybox -- sh
- 131 kubectl get pods
- 132 kubectl exec -it firstningx-5f489b9c69-lbp9z -- sh
- 133 kubectl run faildb --image=mariadb
- 134 kubectl get pods
- 135 kubectl describe pod faildb
- 136 kubectl logs faildb
- 137 kubectl run -h | less
- 138 kubectl run dodb --image=mariadb --env=MARIADB_ROOT_PASSWORD=password
- 139 kubectl get pods
- 140 kubectl delete pod faildb
- 141 history
- 142 vim securitycontextdemo2.yaml
- 143 kubectl apply -f securitycontextdemo2.yaml
- 144 kubectl exec -it security-context-demo -- sh
- 145 cat securitycontextdemo2.yaml
- 146 kubectl explain pod.spec.securityContext | less
- 147 vim securitycontextdemo.yaml
- 148 kubectl apply -f securitycontextdemo.yaml
- 149 kubectl get pods
- 150 kubectl describe pod nginxsecure
- 151 history
- 152 kubectl create job onejob --image=busybox -- date
- 153 kubectl get jobs,pods
- 154 kubectl get jobs onejob -o yaml | less
- 155 kubectl delete job onejob
- 156 kubectl get jobs,pods
- 157 kubectl create job mynewjob --image=busybox --dry-run=client -o yaml -- sleep 5 > mynewjob.yaml
- 158 vim mynewjob.yaml
- 159 kubectl apply -f mynewjob.yaml
- 160 kubectl get jobs,pods
- 161 history
- 162 kubectl get jobs,pods
- 163 kubectl create cronjob -h | less
- 164 kubectl create cronjob runme --image=busybox --schedule="1/* * * * *" -- echo greetings from the cluster
- 165 kubectl create cronjob -h | less
- 166 kubectl create cronjob my-job --image=busybox --schedule="*/1 * * * *" -- date
- 167 kubectl get cronjobs,jobs,pods
- 168 kubectl logs my-job-28373240-4pmqs
- 169 kubectl get cronjobs,jobs,pods
- 170 kubectl delete cronjobs.batch my-job
- 171 kubectl api-resources | less
- 172 history
- 173 git pull
- 174 cd labs/
- 175 ls
- 176 ./ckad-lab5-grade.sh
- 177 kubectl create cronjob
- 178 ./ckad-lab5-grade.sh
- 179 kubectl create cronjob hellojob --image busybox --schedule "*/5 * * * *" -- echo hello
- 180 ./ckad-lab5-grade.sh
- 181 cd ..
- 182 kubectl get cronjobs
- 183 kubectl create job --from=cronjob hellojob
- 184 kubectl create job testjob --from=cronjob hellojob
- 185 kubectl create job -h | less
- 186 kubectl create job testjob --from=hellojob
- 187 kubectl create job testjob --from=cronjob
- 188 kubectl create job testjob --from=cronjob/hellojob
- 189 vim frontend-resources.yaml
- 190 kubectl apply -f frontend-resources.yaml
- 191 kubectl get pods
- 192 kubectl describe pod frontend
- 193 ls
- 194 docker login
- 195 ls ~/.docker/config.json -l
- 196 kubectl create secret docker-registry dockercreds --from-file=.dockerconfigjson=/home/student/.docker/config.json
- 197 kubectl get secrets
- 198 kubectl describe secrets dockercreds
- 199 vim frontend-resources.yaml
- 200 kubectl apply -f frontend-resources.yaml
- 201 kubectl get pods
- 202 kubectl delete pod frontend
- 203 kubectl apply -f frontend-resources.yaml
- 204 kubectl get pods
- 205 kubectl describe pod frontend
- 206 kubectl get pods
- 207 history
- 208 kubectl get sa
- 209 kubectl get sa default -o yaml
- 210 kubectl patch serviceaccount default -p '{"imagePullSecrets":[{"name":"dockercreds"}]}'
- 211 kubectl get sa default -o yaml
- 212 kubectl run testpod --image=nginx:1.17
- 213 kubectl get pods testpod
- 214 ls
- 215 less RESOURCE.TXT
- 216 kubectl delete -f frontend-resources.yaml
- 217 vim frontend-resources.yaml
- 218 kubectl apply -f frontend-resources.yaml
- 219 kubectl get pods frontend
- 220 kubectl describe pods frontend
- 221 kubectl delete -f frontend-resources.yaml
- 222 labs/ckad-lab6-grade.sh
- 223 kubectl run lab6pod --image=nginx
- 224 labs/ckad-lab6-grade.sh
- 225 kubectl delete pod lab6pod
- 226 kubectl run lab6pod --image=nginx --dry-run=client -o yaml > lab6pod.yaml
- 227 vim lab6pod.yaml
- 228 kubectl apply -f lab6pod.yaml
- 229 labs/ckad-lab6-grade.sh
- 230 kubectl get pods lab6pod -o yaml
- 231 labs/ckad-lab6-grade.sh
- 232 kubectl apply -f lab6pod.yaml
- 233 vim busybox-ready.yaml
- 234 kubectl apply -f busybox-ready.yaml
- 235 kubectl get pods
- 236 kubectl describe pods busybox-ready
- 237 kubectl edit pods busybox-ready
- 238 kubectl exec -it busybox-ready -- touch /tmp/nothing
- 239 kubectl get pods
- 240 kubectl create deploy myweb --image=nginx --replicas=3
- 241 kubectl describe deployments.apps myweb
- 242 kubectl get deploy,rs,pods
- 243 kubectl delete pod myweb-9794cbc77-5nqhl
- 244 kubectl get deploy,rs,pods
- 245 cat redis-deploy.yaml
- 246 kubectl apply -f redis-deploy.yaml
- 247 cat redis-deploy.yaml
- 248 kubectl api-resources | less
- 249 vim redis-deploy.yaml
- 250 kubectl apply -f redis-deploy.yaml
- 251 kubectl api-versions
- 252 kubectl get deploy
- 253 kubectl edit deployments.apps redis
- 254 kubectl get deploy
- 255 kubectl get deploy --show-labels
- 256 kubectl get all --selector app=redis
- 257 kubectl delete rs redis-65fbbd8f94
- 258 kubectl get all --selector app=redis
- 259 kubectl scale deployment redis --replicas=2
- 260 kubectl get all --selector app=redis
- 261 kubectl create deploy nginx-lab7 --image=nginx --replicas=3
- 262 kubectl explain deploy.spec | less
- 263 kubectl explain deploy.spec.strategy | less
- 264 kubectl create deploy nginxup --image=nginx:1.14
- 265 kubectl get al --selector app=nginx
- 266 kubectl get all --selector app=nginx
- 267 kubectl get all --selector app=nginxup
- 268 kubectl scale deployment nginxup --replicas=5
- 269 kubectl set image deploy nginxup nginx=nginx:1.17
- 270*
- 271* kubectl get deploy nginxup -o yaml | le
- 272 kubectl set image deploy nginxup nginx=nginx:1.19
- 273 kubectl get all --selector app=nginxup
- 274 history
- 275 kubectl explain deploy.spec.strategy | less
- 276 kubectl explain deploy.spec.strategy.rollingUpdate | less
- 277 kubectl get deploy myweb -o yaml | less
- 278 kubectl get deployments.apps redis -o yaml | less
- 279 kubectl create deploy bluelabel --image=nginx
- 280 kubectl label deployments.apps bluelabel state=demo
- 281 kubectl get deploy --show-labels
- 282 kubectl get deploy --selector state=demo
- 283 kubectl get all --selector app=bluelabel --show-labels
- 284 kubectl describe deployments.apps bluelabel
- 285 kubectl describe pod bluelabel-59d6bcf7ff-5th78
- 286 kubectl label pods bluelabel-59d6bcf7ff-5th78 app-
- 287 kubectl get all | grep blue
- 288 kubectl get all --show-labels | grep blue
- 289 kubectl scale deployment bluelabel --replicas=4
- 290 kubectl set env deploy bluelabel type=blended
- 291 kubectl get all --selector app=bluelabel
- 292 vim rolling.yaml
- 293 kubectl apply -f rolling.yaml
- 294 kubectl rollout history deployment
- 295 kubectl edit deployments.apps rolling-nginx
- 296 kubectl rollout history deployment rolling-nginx
- 297 kubectl rollout history deployment rolling-nginx --revision=2
- 298 kubectl rollout history deployment rolling-nginx --revision=1
- 299 kubectl rollout undo deployment rolling-nginx --to-revision=1
- 300 kubectl get all
- 301 history
- 302 kubectl explain deploy.spec | less
- 303 kubectl edit deployments.apps bluelabel
- 304 kubectl get all --selector app=bluelabel
- 305 kubectl get pods -n kube-system
- 306 kubectl get svc -n kube-system
- 307 kubectl exec bluelabel-798bf758fc-n66bb -- cat /etc/resolv.conf
- 308 kubectl create deploy nginxsvc --image=nginx
- 309 kubectl scale deployment nginxsvc --replicas=3
- 310 kubectl expose deployment nginxsvc --port=80
- 311 kubectl get all --selector app=nginxsvc
- 312 kubectl get pods --selector app=nginxsvc
- 313 kubectl get pods --selector=app=nginxsvc -o wide
- 314 kubectl describe svc nginxsvc
- 315 kubectl get endpoints
- 316 kubectl get svc
- 317 curl 10.104.25.69
- 318 minikube ssh
- 319 minikube ip
- 320 kubectl edit svc nginxsvc
- 321 kubectl get svc
- 322 curl 192.168.49.2:32000
- 323 kubectl run testpod --image=busybox -- sleep 3600
- 324 kubectl describe pods testpod
- 325 kubectl delete pod testpod
- 326 kubectl run testpod --image=busybox -- sleep 3600
- 327 kubectl create ns other
- 328 kubectl run newginx -n other
- 329 kubectl run newginx --image=nginx -n other
- 330 kubectl expose -n other pod newginx --port=80
- 331 kubectl get svc -A
- 332 kubectl get svc,pods -n kube-system
- 333 kubectl exec -it testpod -- cat /etc/resolv.conf
- 334 kubectl exec -it testpod -- nslookup nginxsvc
- 335 kubectl exec -it testpod -- nslookup newginx
- 336 kubectl exec -it testpod -- nslookup newginx.other.svc.cluster.local
- 337 minikube addons list
- 338 minikube addons enable ingress
- 339 kubectl get ns
- 340 kubectl get all -n ingress-nginx
- 341 kubectl get all --selector app=nginxsvc
- 342 curl 192.168.49.2:32000
- 343 kubectl create ing -h | less
- 344 kubectl create ing nginxsvc-ingress --rule="/=nginxsvc:80" --rule="/hello=newdep:8080"
- 345 kubectl describe ing nginxsvc-ingress
- 346 sudo vim /etc/hosts
- 347 kubectl get ingress
- 348 curl nginxsvc.info
- 349 curl nginxsvc.info/hello
- 350 kubectl create deploy newdep --image=gcr.io/google-samples/hello-app:2.0
- 351 kubectl expose deployment newdep --port=8080
- 352 kubectl describe ing nginxsvc-ingress
- 353 curl nginxsvc.info/hello
- 354 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement