Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 cd ckad/
- 2 ./countdown 4
- 3 vim sg.yal
- 4 vim sg.yaml
- 5 kubectl apply sg.yaml
- 6 kubectl apply -f sg.yaml
- 7 kubectl run sidecard --image=busybox --dry-run=client -o yaml -- sleep infinity
- 8 kubectl run sidecard --image=busybox --dry-run=client -o yaml -- sleep infinity > sidecard.yaml
- 9 vim sidecard.yaml
- 10 kubectl apply -f sidecard.yaml
- 11 kubectl get pods
- 12 ./countdown 12
- 13 history
- 14 minikube start --vm-driver=docker --cni=calico
- 15 kubectl get all
- 16 ./countdown 2
- 17 minikube dashboard
- 18 source <(kubectl completion bash)
- 19 kubectl create deploy apptwo --image=nginx --replicas=3
- 20 kubectl get all
- 21 history
- 22 ./countdown 15
- 23 kubectl get all
- 24 kubectl delete pod appone-dcc78d77f-mrz5r
- 25 kubectl get all
- 26 kubectl create deploy appthree --image=nginx
- 27 kubectl get all
- 28 kubectl create -h
- 29 kubectl create -h | less
- 30 kubectl create deploy -h | less
- 31 kubectl completion -h | less
- 32 kubectl get pods
- 33 kubectl get pods appthree-dd4b5fc5d-vsmc4 -o yaml | less
- 34 ls
- 35 cd dockerfile/
- 36 ls
- 37 vim Dockerfile
- 38 docker build -t centmap:1.0 .
- 39 docker images
- 40 cd ..
- 41 ls
- 42 cd alpmap/
- 43 ls
- 44 vim Containerfile
- 45 docker build -t alpmap .
- 46 mv Containerfile Dockerfile
- 47 docker build -t alpmap .
- 48 touch sander.repo
- 49 docker build -t alpmap .
- 50 docker images
- 51 docker save alpmap
- 52 docker save --help | less
- 53 docker save alpmap -o alpmap.tgz
- 54 ls -l alpmap.tgz
- 55 file alpmap.tgz
- 56 kubectl explain pod.spec | less
- 57 kubectl get all
- 58 kubectl delete pod appthree-dd4b5fc5d-vsmc4
- 59 kubectl get all
- 60 kubectl run alone --image=nginx
- 61 kubectl get all
- 62 kubectl delete pod alone
- 63 kubectl get all
- 64 history
- 65 kubectl run -h | less
- 66 kubectl get pods appthree-dd4b5fc5d-z58r2 -o yaml | less
- 67 kubectl describe pods appthree-dd4b5fc5d-z58r2 | less
- 68 cd ..
- 69 ./countdown 4
- 70 kubectl run busybox --image-busybox
- 71 kubectl run busybox --image=busybox
- 72 kubectl get pods
- 73 kubectl describe pod busybox
- 74 kubectl delete pod busybox
- 75 kubectl run busybox --image=busybox --restart=Never
- 76 kubectl get pods
- 77 ./countdown 12
- 78 kubectl get pods busybox -o yaml | less
- 79 ./countdown 12
- 80 kubectl explain pod
- 81 kubectl explain pod.spec
- 82 ls
- 83 vim busybox.yaml
- 84 kubectl run mynginx --image=nginx --dry-run=client -o yaml > mynginx.yaml
- 85 vim mynginx.yaml
- 86 kubectl create -f mynginx.yaml
- 87 kubectl remove -f mynginx.yaml
- 88 kubectl delete -f mynginx.yaml
- 89 kubectl apply -f mynginx.yaml
- 90 vim sidecar.yaml
- 91 kubectl apply -f sidecar.yaml
- 92 kubectl get pods
- 93 kubectl exec -it sidecar-pod -c sidecar -- /bin/bash
- 94 vim sidecar.yaml
- 95 vim bonuslab.txt
- 96 history
- 97 cat bonuslab.txt
- 98 cat sidecar.yaml
- 99 ls -lrt
- 100 history
- 101 cat bonuslab.txt
- 102 cat sidecard.yaml
- 103 vim init-example1.yaml
- 104 kubectl apply -f init-example1.yaml
- 105 kubectl get pods
- 106 vim init-example2.yaml
- 107 kubectl apply -f init-example2.yaml
- 108 kubectl get pods
- 109 kubectl describe pod init-demo2
- 110 kubectl get ns
- 111 kubectl get pods
- 112 kubectl get pods -A
- 113 kubectl create ns secret
- 114 kubectl run secretpod --image=nginx -n secret
- 115 kubectl get pods
- 116 kubectl get pods -n secret
- 117 kubectl config set-context --current --namespace=secret
- 118 kubectl get pods
- 119 kubectl config set-context --current -n default
- 120 kubectl config set-context --current --namespace=default
- 121 kubectl get pods
- 122 history
- 123 ./countdown 2
- 124 kubectl run faildb --image=mariadb
- 125 kubectl get pods
- 126 kubectl describe pod faildb | less
- 127 kubectl logs faildb
- 128 kubectl delete pod faildb
- 129 kubectl run faildb --image=mariadb --env MARIADB_ROOT_PASSWORD=password
- 130 kubectl get pods
- 131 kubectl run -h | less
- 132 kubectl explain --recursive pod.spec | less
- 133 kubectl explain pod.spec.containers | less
- 134 kubectl explain pod.spec.containers.securityContext
- 135 kubectl explain pod.spec.containers.securityContext | less
- 136 vim securitycontextdemo2.yaml
- 137 kubectl apply -f securitycontextdemo2.yaml
- 138 kubectl exec -it security-context-demo -- sh
- 139 kubectl apply -f securitycontextdemo.yaml
- 140 vim securitycontextdemo.yaml
- 141 kubectl get pods
- 142 kubectl describe pod nginxsecure
- 143 history
- 144 kubectl explain --recursive pod.spec | less
- 145 kubectl explain pod.spec | less
- 146 kubectl explain pod.spec.securitycontext
- 147 kubectl explain pod.spec.securityContext
- 148 kubectl explain pod.spec.containers.securityContext
- 149 history
- 150 sudo poweroff
- 151 sudo apt install vim git -y
- 152 git clone https://github.com/sandervanvugt/ckad
- 153 history
- 154 cd ckad/
- 155 ls
- 156 ./minikube-docker-setup.sh
- 157 minikube start
- 158 kubectl explain job.spec | less
- 159 source <(kubectl completion bash)
- 160 kubectl create job -h | less
- 161 kubectl create onejob --image=busybox -- date
- 162 kubectl create job onejob --image=busybox -- date
- 163 kubectl get jobs
- 164 kubectl get jobs,pods
- 165 kubectl get jobs onejob -o yaml | less
- 166 kubectl delete jobs onejob
- 167 kubectl get pods
- 168 kubect create job mynewjob --image=busybox --dry-run=client -o yaml -- sleep 5 > mynewjob.yaml
- 169 kubectl create job mynewjob --image=busybox --dry-run=client -o yaml -- sleep 5 > mynewjob.yaml
- 170 vim mynewjob.yaml
- 171 kubectl apply -f mynewjob.yaml
- 172 kubectl get jobs,pods
- 173 kubectl create cronjob -h | less
- 174 kubectl create cronjob runme --image=busybox --schedule="*/2 * * 6 1-5"
- 175 kubectl get cronjobs,jobs,pods
- 176 date
- 177 kubectl get cronjobs -o yaml
- 178 kubectl get cronjobs,jobs,pods
- 179 kubectl logs runme-28122618-8lgbl
- 180 kubectl get cronjobs -o yaml
- 181 kubectl create cronjob runmeagain --image=busybox --schedule="*/2 * * 6 1-5" -- echo take two
- 182 date
- 183 kubectl get cronjobs,jobs,pods
- 184 kubectl logs runmeagain-28122620-b7hnv
- 185 history
- 186 kubectl create cronjob -h | less
- 187 kubectl create cronjob logjob --image=busybox --schedule="5 * * * *" -- logger hello world
- 188 #kubectl create cronjob logjob --image=busybox --schedule="0 5 * * *" -- logger hello world
- 189 kubectl explain pod.spec.containers.resources
- 190 cd ckad/
- 191 vim frontend-resources.yaml
- 192 kubectl apply -f frontend-resources.yaml
- 193 kubectl get pods
- 194 kubectl describe pods frontend
- 195 kubectl delete -f frontend-resources.yaml
- 196 vim frontend-resources.yaml
- 197 kubectl apply -f frontend-resources.yaml
- 198 kubectl get pods
- 199 kubectl get deployments.apps
- 200 kubectl delete deployments.apps appone apptwo appthree
- 201 kubectl get pods
- 202 kubectl delete cronjobs.batch logjob runme runmeagain
- 203 kubectl get pods
- 204 kubectl describe pod frontend
- 205 kubectl delete -f frontend-resources.yaml
- 206 vim frontend-resources.yaml
- 207 kubectl apply -f frontend-resources.yaml
- 208 kubectl get pods
- 209 history
- 210 cat frontend-resources.yaml
- 211 vim lab6.yaml
- 212 kubectl apply -f lab6.yaml
- 213 kubectl get pods
- 214 kubectl get pods lab6 -o yaml | less
- 215 vim lab6.yaml
- 216 kubectl delete pod lab6
- 217 kubectl apply -f lab6.yaml
- 218 kubectl get pods lab6 -o yaml | less
- 219 vim busybox-ready.yaml
- 220 kubectl apply -f busybox-ready.yaml
- 221 kubectl get pods
- 222 kubectl describe pods busybox-ready
- 223 kubectl edit pods busybox-ready
- 224 kubectl exec -it busybox-ready -- /bin/sh
- 225 kubectl get pods
- 226 vim nginx-probes.yaml
- 227 kubectl apply -f nginx-probes.yaml
- 228 history
- 229 vim dm9.yaml
- 230 kubectl create cronjob -h | less
- 231 kubectl create cronjob lab9job --image=busybox --schedule="*/1 * * * *" --dry-run=client -o yaml -- sleep 30 > lab9.yaml
- 232 kubectl explain job.spec
- 233 kubectl explain job.spec | less
- 234 vim lab9.yaml
- 235 kubectl apply -f lab9.yaml
- 236 kubectl get cronjobs,jobs,pods
- 237 history
- 238 cat lab9.yaml
- 239 kubectl get all
- 240 kubectl delete cronjobs.batch lab9job
- 241 kubectl delete pod busybox busybox-ready faildb init-demo1 init-demo2 lab6 mynginx nginx-probes nginxsecure security-context-demo sidecar-pod sidecard sidecar-question
- 242 kubectl get pods
- 243 kubectl create deploy myweb --image=nginx --replicas 3
- 244 kubectl get all
- 245 kubectl describe deployments.apps myweb
- 246 kubectl get all
- 247 kubectl delete pod myweb-5b7f574f7f-v8h5g
- 248 kubectl get all
- 249 kubectl run pod mypod --image=nginx
- 250 kubectl get pods
- 251 kubectl run mypod --image=nginx
- 252 kubectl get pods
- 253 kubectl delete pod pod
- 254 kubectl delete pod mypod
- 255 kubectl get pods
- 256 vim redis-deploy.yaml
- 257 kubectl apply -f redis-deploy.yaml
- 258 vim redis-deploy.yaml
- 259 kubectl api-versions
- 260 vim redis-deploy.yaml
- 261 kubectl apply -f redis-deploy.yaml
- 262 kubectl get all
- 263 kubectl edit deployments.apps redis
- 264 kubectl get all
- 265 kubectl scale deployment redis --replicas 1
- 266 kubectl get all
- 267 kubectl delete rs redis-6dc855767d
- 268 kubectl get all
- 269 history
- 270 kubectl create deployment nginx-lab7 --image=nginx --replicas 3
- 271 kubectl get all --selector app=nginx-lab7
- 272 kubectl create deployment nginxup --image=nginx:1.14
- 273 kubectl get all --selector app=nginxup
- 274 kubectl set -h | less
- 275 kubectl set image deploy nginxup nginx=nginx:1.17
- 276 kubectl get all --selector app=nginxup
- 277 kubectl get deployments.apps redis -o yaml | less
- 278 kubectl create deploy bluelabel --image=nginx
- 279 kubectl label deploy bluelabel state=demo
- 280 kubectl get all --show-labels --selector app=bluelabel
- 281 kubectl get all --show-labels --selector state=demo
- 282 kubectl describe deployments.apps bluelabel
- 283 kubectl describe pod bluelabel-5cdb7645b5-kt2xm | less
- 284 kubectl label pod bluelabel-5cdb7645b5-kt2xm app-
- 285 kubectl get all --show-labels
- 286 kubectl get deploy bluelabel -o yaml | less
- 287 kubectl scale deployment bluelabel --replicas=4
- 288 kubectl set env deploy bluelabel type=blended
- 289 kubectlk get all --selector app=bluelabel
- 290 kubectl get all --selector app=bluelabel
- 291 ./countdown 14
- 292 kubectl edit deployments.apps bluelabel
- 293 vim rolling.yaml
- 294 kubectl apply -f rolling.yaml
- 295 kubectl rollout history deployment
- 296 kubectl edit deployments.apps rolling-nginx
- 297 kubectl rollout history deployment rolling-nginx
- 298 kubectl describe deployments.apps rolling-nginx
- 299 kubectl rollout history deployment rolling-nginx --revision=2
- 300 kubectl rollout history deployment rolling-nginx --revision=1
- 301 kubectl rollout undo deployment rolling-nginx --to-revision 1
- 302 kubectl get all
- 303 kubectl create deploy nginxsvc --image=nginx
- 304 kubectl get deploy
- 305 kubectl scale deployment nginxsvc --replicas=3
- 306 kubectl expose deployment nginxsvc --port=80
- 307 kubectl describe svc nginxsvc
- 308 kubectl get svc nginxsvc -o yaml | less
- 309 kubectl get svc
- 310 kubectl get endpoints
- 311 kubectl scale deployment nginxsvc --replicas 5
- 312 kubectl get endpoints
- 313 curl 10.105.204.135
- 314 minikube ssh
- 315 kubectl edit svc nginxsvc
- 316 kubectl get svc
- 317 minikube ip
- 318 curl 192.168.49.2:30762
- 319 ./countdown 2
- 320 history
- 321 kubectl edit svc nginxsvc
- 322 kubectl get svc
- 323 minikube ip
- 324 curl 192.168.49.2:30762
- 325 kubectl describe svc
- 326 kubectl edit svc nginxsvc
- 327 kubectl get endpoints
- 328 curl 192.168.49.2:30762
- 329 history
- 330 kubectl get svc,pods -n kube-system
- 331 kubectl run testpod --image=busybox -- sleep 3600
- 332 kubectl create ns other
- 333 kubectl run newnginx --image=nginx -n other
- 334 kubectl expose -n other newnginx --port=80
- 335 kubectl expose pod -n other newnginx --port=80
- 336 kubectl get svc -A
- 337 kubectl exec -it testpod -- cat /etc/resolv.conf
- 338 kubectl get pods,svc -n kube-system
- 339 kubectl exec -it testpod -- nslookup nginxsvc
- 340 kubectl exec -it testpod -- nslookup newnginx
- 341 kubectl exec -it testpod -- nslookup newnginx.other.svc.cluster.local
- 342 history
- 343 vim nwpolicy-complete-example.yaml
- 344 kubectl apply -f nwpolicy-complete-example.yaml
- 345 kubectl expose pod nginx --port=80
- 346 kubectl exec -it busybox -- wget --spider --timeout=1 nginx
- 347 kubectl label pod busybox access=true
- 348 kubectl exec -it busybox -- wget --spider --timeout=1 nginx
- 349 vim nwpolicy-complete-example.yaml
- 350 history
- 351 kubectl exec busybox -- wget --spider --timeout=1 nginx
- 352 minikube addons list
- 353 minikube addons enable ingress
- 354 kubectl get ns
- 355 kubectl get pods,svc -n ingress-nginx
- 356 kubectl get svc
- 357 kubectl create ing -h | less
- 358 kubectl create ingress nginxsvc-ingress --rule="/=nginxsvc:80" --rule="/hello=newdep:8080"
- 359 sudo vim /etc/hosts
- 360 kubectl get ingress
- 361 curl nginxsvc.info
- 362 kubectl describe ing nginxsvc-ingress
- 363 kubectl create deploy newdep --image=gcr.io/google-samples/hello-app:2.0
- 364 kubectl expose deploy newdep --port=8080
- 365 kubectl describe ing nginxsvc-ingress
- 366 curl nginxsvc.info
- 367 curl nginxsvc.info/hello
- 368 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement