Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #####MINIKUBE COMMANDSstudent@student-virtual-machine:~/Downloads$ history
- 1 sudo apt install vim git
- 2 cd ckad
- 3 ./countdown 15
- 4 ./countdown 13
- 5 ./countdown 1
- 6 git clone https://github.com/sandervanvugt/ckad
- 7 sudo apt install git vim -y
- 8 git clone https://github.com/sandervanvugt/ckad
- 9 cd ckad
- 10 ls
- 11 ./minikube-docker-setup.sh
- 12 minikube start --vm-driver=docker --cni=calico
- 13 kubectl get all
- 14 minikube ssh
- 15 kubectl get all
- 16 minikube status
- 17 minikube dashboard
- 18 kubectl get all
- 19 kubectl create deployment firstginx --image=nginx --replicas=3
- 20 kubectl get all
- 21 history
- 22 source <(kubectl completion bash)
- 23 sudo apt install bash-completion
- 24 kubectl -h
- 25 kubectl create -h | less
- 26 kubectl create deploy -h | less
- 27 history
- 28 cd
- 29 cd .kube/
- 30 cat config
- 31 kubectl config view
- 32 kubectl config set-context --current --namespace=mynamespace
- 33 kubectl config set-context --current --namespace=default
- 34 cd
- 35 cd ckad
- 36 ls
- 37 cd dockerfile/
- 38 ls
- 39 vim Dockerfile
- 40 docker build -t nmap .
- 41 docker images
- 42 docker save --help | less
- 43 docker save -o nmap.tar nmap
- 44 ls -l
- 45 cd ..
- 46 history
- 47 ./countdown 1
- 48 kubectl get pods
- 49 kubectl get pods firstginx-7c4fcf6b55-bk2c5 -o yaml| less
- 50 kubectl get all
- 51 kubectl delete deploy dashginx
- 52 kubectl get all
- 53 kubectl delete pod firstginx-7c4fcf6b55-bk2c5
- 54 kubectl get all
- 55 kubectl run -h | less
- 56 kubectl run nginx --image=nginx
- 57 kubectl get all
- 58 kubectl delete pod nginx
- 59 kubectl get all
- 60 kubectl describe pod firstginx-7c4fcf6b55-t4grh
- 61 history
- 62 kubectl get pods firstginx-7c4fcf6b55-bk2c5 -o yaml| less
- 63 kubectl get pods firstginx-7c4fcf6b55-t4grh -o yaml | less
- 64 kubectl explain pods
- 65 kubectl explain pods.spec | less
- 66 kubectl explain pods.spec.affinity | less
- 67 kubectl explain --recursive pods.spec
- 68 kubectl explain --recursive pods.spec | wc
- 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 sidecar.yaml
- 72 kubectl apply -f sidecar.yaml
- 73 kubectl exec -it sidecar-pod -c sidecar -- /bin/bash
- 74 kubectl get pods
- 75 vim sidecar.yaml
- 76 docker search httpd | grep centos
- 77 kubectl exec -it sidecar-pod -c sidecar -- /bin/bash
- 78 kubectl delete pod sidecar-pod
- 79 vim sidecard2.yaml
- 80 kubectl create -f sidecard2.yaml
- 81 vim sidecard2.yaml
- 82 kubectl create -f sidecard2.yaml
- 83 vim sidecard2.yaml
- 84 kubectl create -f sidecard2.yaml
- 85 kubectl get pods
- 86 kubectl describe pods two-containers
- 87 kubectl exec -it two-containers -c nginx-container -- sh
- 88 history
- 89 vim init-example1.yaml
- 90 kubectl apply -f init-example1.yaml
- 91 kubectl get pods
- 92 kubectl describe pods init-demo1
- 93 kubectl get pods
- 94 vim init-example2.yaml
- 95 kubectl create -f init-example2.yaml
- 96 kubectl get pods
- 97 sudo reboot
- 98 sudo -i
- 99 history | less
- 100 minikube start --vm-driver=docker --cni=calico
- 101 cd ckad
- 102 vim init-example1.yaml
- 103 kubectl get pods
- 104 kubectl delete pod init-demo1
- 105 vim init-example1.yaml
- 106 kubectl create -f init-example1.yaml
- 107 kubectl get pods
- 108 wget -O http://info.cern.ch
- 109 wget -O /tmp/index.html http://info.cern.ch
- 110 cat /tmp/index.html
- 111 source <(kubectl completion bash)
- 112 kubectl describe pod init-demo1
- 113 kubectl logs init-demo1
- 114 kubectl logs init-demo1 -c install
- 115 wget -O /tmp/index.html http://info.cern.ch
- 116 kubectl exec -it init-demo1 -c install -- bash
- 117 kubectl exec -it init-demo1 -c install -- sh
- 118 kubectl run mydb --image=mariadb
- 119 kubectl get pods
- 120 kubectl describe pod mydb
- 121 kubectl logs mydb
- 122 kubectl delete pod mydb
- 123 kubectl run -h | less
- 124 kubectl run mydb --image=mariadb --env MARIADB_ROOT_PASSWORD=password
- 125 kubectl get pods
- 126 kubectl run busy --image=busybox
- 127 kubectl get pods
- 128 kubectl describe pod busy
- 129 kubectl get pods busy -o yaml
- 130 kubectl get pods
- 131 kubectl get ns
- 132 kubectl get pods -n default
- 133 kubectl get pods -n kube-system
- 134 kubectl get all -n kubernetes-dashboard
- 135 kubectl describe ns kube-system
- 136 kubectl get all -A
- 137 kubectl get pods -A
- 138 kubectl create ns secret
- 139 kubectl run secretpod --image=nginx -n secret
- 140 kubectl get pods
- 141 kubectl get pods -n secret
- 142 kubectl config set-context --current --namespace=secret
- 143 kubectl get all
- 144 kubectl config set-context --current --namespace=default
- 145 history
- 146 sudo poweroff
- 147 minikube start
- 148 kubectl explain pod.spec | less
- 149 kubectl explain pod.spec.securityContext | less
- 150 kubectl explain pod.spec.containers.securityContext | less
- 151 cd ckad/
- 152 ls
- 153 vim securitycontextdemo2.yaml
- 154 kubectl apply -f securitycontextdemo2.yaml
- 155 kubectl get pods
- 156 kubectl exec -it security-context-demo -- sh
- 157 vim securitycontextdemo.yaml
- 158 kubectl apply -f securitycontextdemo.yaml
- 159 kubectl get pods
- 160 kubectl describe nginxsecure
- 161 kubectl describe pod nginxsecure
- 162 kubectl create job onejob --image=busybox -- date
- 163 kubectl get jobs,pods
- 164 kubectl get jobs onejob -o yaml | less
- 165 kubectl get jobs,pods
- 166 kubectl delete job onejob
- 167 kubectl get jobs,pods
- 168 kubectl create job mynewjob --image=busybox --dry-run=client -o yaml -- sleep 5 > mynewjob.yaml
- 169 vim mynewjob.yaml
- 170 kubectl apply -f mynewjob.yaml
- 171 kubectl get jobs,pods
- 172 kubectl explain jobs.spec | less
- 173 kubectl explain --recursive jobs.spec | less
- 174 kubectl get jobs,pods
- 175 kubectl create cronjob -h | less
- 176 kubectl create cronjob runme --image=busybox --schedule="*/10 * * * *" -- echo greetings from the cluster
- 177 kubectl get cronjobs,jobs,pods
- 178 date
- 179 kubectl creat job --from=cronjob/runme
- 180 kubectl create job --from=cronjob/runme
- 181 kubectl create job testjob --from=cronjob/runme
- 182 kubectl get cronjobs,jobs,pods
- 183 kubectl logs testjob-6ckzk
- 184 source <(kubectl completion bash)
- 185 history
- 186 kubectl create cronjob sayhello --image=busybox --schedule="* * * * *" -- logger hello world
- 187 date
- 188 kubectl get jobs,cronjobs,pods
- 189 kubectl logs sayhello-27759758-zxwzg
- 190 kubectl exec -it sayhello-27759758-zxwzg -- journalctl
- 191 vim frontend-resources.yaml
- 192 kubectl apply -f frontend-resources.yaml
- 193 kubectl get pods
- 194 kubectl describe pod frontend
- 195 kubectl delete -f frontend.yaml
- 196 kubectl delete -f frontend-resources.yaml
- 197 vim frontend-resources.yaml
- 198 kubectl apply -f frontend-resources.yaml
- 199 kubectl get pods
- 200 kubectl describe pods frontend
- 201 kubectl delete -f frontend-resources.yaml
- 202 vim frontend-resources.yaml
- 203 kubectl apply -f frontend-resources.yaml
- 204 kubectl get pods
- 205 kubectl describe pod frontend
- 206 kubectl delete -f frontend-resources.yaml
- 207 kubectl run httpd --image=httpd:2/4/54-alpine --dry-run=client -o yaml | kubectl set resources -f --limits "memory=512Mi" --requests "memory=512Mi" --local -o yaml | kubectl create -f -
- 208 kubectl run httpd --image=httpd:2.4.54-alpine --dry-run=client -o yaml | kubectl set resources -f - --limits "memory=512Mi" --requests "memory=512Mi" --local -o yaml | kubectl create -f -
- 209 kubectl get pods httpd -o yaml | less
- 210 vim lab6.yaml
- 211 kubectl create -f lab6.yaml
- 212 kubectl get pods
- 213 kubectl get pods webserver -o yaml
- 214 history
- 215 vim busybox-ready.yaml
- 216 kubectl creat -f busybox-ready.yaml
- 217 kubectl create -f busybox-ready.yaml
- 218 kubectl get pods
- 219 kubectl edit pods busybox-ready
- 220 kubectl get pods
- 221 kubectl exec -it busybox-ready -- touch /tmp/nothing
- 222 kubectl get pods
- 223 vim nginx-probes.yaml
- 224 kubectl create -f nginx-probes.yaml
- 225 kubectl get pods
- 226 kubectl create deploy -h | less
- 227 kubectl create deploy myweb --image=nginx --replicas=3
- 228 kubectl describe deploy myweb | less
- 229 kubectl get deploy myweb -o yaml | less
- 230 kubectl get all
- 231 kubectl get all --selector app=myweb
- 232 kubectl delete pods myweb-d5b9458bc-5wc98
- 233 kubectl get all --selector app=myweb
- 234 kubectl run blahpod --image=nginx
- 235 kubectl delete pod blahpod
- 236 vim redis-deploy.yaml
- 237 kubectl create -f redis-deploy.yaml
- 238 vim redis-deploy.yaml
- 239 kubectl api-versions
- 240 vim redis-deploy.yaml
- 241 kubectl create -f redis-deploy.yaml
- 242 kubectl api-resources | less
- 243 kubectl edit deploy redis
- 244 kubectl get all --selector app=redis
- 245 kubectl delete rs redis-6467896d84
- 246 kubectl get all --selector app=redis
- 247 kubectl create -h | less
- 248 kubectl create deploy -h | less
- 249 kubectl create deploy nginxup --image=nginx:1.14 --replicas=7
- 250 kubectl get all --selector app=nginxup
- 251 kubectl set -h | less
- 252 kubectl set image deploy nginxup nginx=nginx:1.17
- 253 kubectl get all --selector app=nginxup
- 254 kubectl get all --show-labels
- 255 kubectl get deploy redis -o yaml | less
- 256 history | grep redis
- 257 history | grep apply
- 258 vim redis-deploy.yaml
- 259 kubectl apply -f redis-deploy.yaml
- 260 kubectl get deploy redis2 -o yaml | less
- 261 kubectl create deploy bluelabel --image=nginx --replicas=2
- 262 kubectl label deployments.apps bluelabel state=demo
- 263 kubectl get deploy --show-labels
- 264 kubectl get deploy --selector state=demo
- 265 kubectl get all --selector state=demo
- 266 kubectl get all --selector app=bluelabel
- 267 kubectl describe deployments.apps bluelabel
- 268 kubectl get pods | grep blue
- 269 kubectl label pod bluelabel-d7894847c-c2vb5 app-
- 270 kubectl get pods | grep blue
- 271 kubectl create deploy -h | less
- 272 kubectl create deploy blah --image=nginx --label "state=demo"
- 273 kubectl get pods --show-labels
- 274 kubectl get pods -l run
- 275 kubectl get pods -l run --show-labels
- 276 kubectl get pods --show-labels | grep run
- 277 kubectl get pods --show-labels | grep run=
- 278 ./countdown 14
- 279 vim lab9.yaml
- 280 kubectl apply -f lab9.yaml
- 281 kubectl get all
- 282 kubectl get jobs,cronjobs,pods --show-labels
- 283 kubectl get jobs,cronjobs,pods | grep kill
- 284 vim lab9.yaml
- 285 kubectl get -h | less
- 286 kubectl get deploy bluelabel -o yaml
- 287 oc get deploy
- 288 kubectl get deploy
- 289 kubectl scale deploy bluelabel --replicas=8
- 290 kubectl set env deploy bluelabel type=blended
- 291 kubectl get all --selector app=bluelabel
- 292 kubectl delete all --all
- 293 kubectl get all
- 294 vim rolling.yaml
- 295 kubectl apply -f rolling.yaml
- 296 kubectl rollout history deploy
- 297 kubectl edit deploy rolling-nginx
- 298 kubectl rollout history deploy
- 299 kubectl describe deployments.apps rolling-nginx
- 300 kubectl rollout history deployment rolling-nginx --revision=2
- 301 kubectl rollout history deployment rolling-nginx --revision=1
- 302 kubectl rollout undo deployment rolling-nginx --to-revision=1
- 303 kubectl rollout history deploy
- 304 ./countdown 1
- 305 ./countdown 13
- 306 kubectl create deploy nginxsvc --image=nginx
- 307 kubectl get all --selector app=nginxsvc
- 308 kubectl scale deployment nginxsvc --replicas=3
- 309 kubectl expose deploy nginxsvc --port=80
- 310 kubectl describe svc nginxsvc
- 311 kubectl get svc nginxsvc -o yaml
- 312 kubectl get svc
- 313 kubectl get endpoints
- 314 curl 10.106.169.198
- 315 minikube ssh
- 316 kubectl edit svc nginxsvc
- 317 kubectl get svc
- 318 minikube ip
- 319 curl 192.168.49.2:31486
- 320 kubectl run testpod --image=busybox -- sleep 3600
- 321 kubectl get svc
- 322 kubectl get svc,pods -n kube-system
- 323 kubectl exec -it testpod -- cat /etc/resolv.conf
- 324 kubectl exec -it testpod -- nslookup nginxsvc
- 325 vim nwpolicy-complete-example.yaml
- 326 kubectl expose pod nginx --port=80
- 327 kubectl create -f nwpolicy-complete-example.yaml
- 328 kubectl expose pod nginx --port=80
- 329 kubectl get svc,pods,networkpolicy
- 330 kubectl exec -it busybox -- wget --spider --timeout=1 nginx
- 331 history
- 332 minikube status
- 333 minikube addons list
- 334 minikube addon enable ingress
- 335 minikube addons enable ingress
- 336 kubectl get ns
- 337 kubectl get pods -n ingress-nginx
- 338 source <(kubectl completion bash)
- 339 kubectl get deploy
- 340 kubectl delete deployments.apps rolling-nginx
- 341 kubectl get svc
- 342 curl http://192.168.49.2:31486
- 343 kubectl create ingress -h | less
- 344 kubectl create ingress nginxsvc-ingress --rule="/=nginxsvc:80" --rule="/hello=newdep:8080"
- 345 sudo vim /etc/hosts
- 346 kubectl get ingress
- 347 curl nginxsvc.info
- 348 kubectl describe ingress
- 349 kubectl describe svc nginxsvc
- 350 kubectl create deployment newdep --image=gcr.io/google-samples/hello-app:2.0
- 351 kubectl expose deployment newdep --port=8080
- 352 kubectl describe ingress
- 353 curl nginxsvc.info/hello
- 354 history
- 355 kubectl explain pod.spec.volumes | less
- 356 vim morevolumes.yaml
- 357 kubectl create -f morevolumes.yaml
- 358 kubectl get pods morevol2
- 359 kubectl describe pods morevol2
- 360 kubectl get pods morevol2
- 361 kubectl exec -it morevol2 -c centos1 -- touch /centos1/test
- 362 kubectl exec -it morevol2 -c centos2 -- ls -l /centos2
- 363 date
- 364 kubectl exec -it morevol2 -c centos1 -- touch /centos1/testingaain
- 365 kubectl exec -it morevol2 -c centos2 -- ls -l /centos2
- 366 history
- 367 vim pv.yaml
- 368 kubectl create -f pv.yaml
- 369 kubectl get pv
- 370 vim pvc.yaml
- 371 kubectl create -f pvc.yaml
- 372 kubectl get pvc,pv
- 373 kubectl get storageclass
- 374 kubectl describe pv pvc-cd6e6d2f-0b74-4dfd-801c-9a515d60cc00
- 375 kubectl get pvc,pv
- 376 vim pvc-pod.yaml
- 377 kubectl create -f pvc-pod.yaml
- 378 kubectl get pvc,pv
- 379 kubectl describe pv pvc-4d989416-4fcf-494a-9709-7dcbfc96cdce
- 380 kubectl exec -it nginx-pvc-pod -- touch /usr/share/nginx/html/testfileZ
- 381 minikube ssh
- 382 ./countdown 1
- 383 kubectl explain persistentvolume.spec.csi
- 384 ./countdown 13
- 385 kubectl create deploy mydb --image=mariadb
- 386 kubectl get all
- 387 kubectl describe pods mydb-c8bddc94c-nb8mv
- 388 kubectl logs mydb-c8bddc94c-nb8mv
- 389 kubectl set env deploy mydb MARIADB_ROOT_PASSWORD=password
- 390 kubectl get all
- 391 kubectl get deploy mydb -o yaml > mydb.yaml
- 392 vim mydb.yaml
- 393 vim varsfile
- 394 kubectl create cm mydbvars --from-env-file=varsfile
- 395 kubectl describe cm mydbvars
- 396 kubectl delete deploy mydb
- 397 kubectl create deploy mydb --image=mariadb --replicas=3
- 398 kubectl get all --selector app=mydb
- 399 kubectl set env deploy mydb --from=configmap/mydbvars
- 400 kubectl get all --selector app=mydb
- 401 kubectl get deploy mydb -o yaml
- 402 echo hello world > index.html
- 403 kubectl create cm myindex --from-file=index.html
- 404 kubectl describe cm myindex
- 405 kubectl create cm mypasswd --from-file=/etc/passwd
- 406 kubectl describe cm mypasswd
- 407 kubectl create deployment myweb --image=nginx
- 408 kubectl edit deploy myweb
- 409 kubectl get all
- 410 kubectl exec -it myweb -- cat /usr/share/nginx/html/index.html
- 411 kubectl exec -it myweb-859f554699-jqng6 -- cat /usr/share/nginx/html/index.html
- 412 kubectl create secret -h
- 413 kubectl create secret generic dbpw --from-literal=ROOT_PASSWORD=password
- 414 kubectl describe secret dbpw
- 415 kubectl get secret dbpw -o yaml
- 416 echo cGFzc3dvcmQ= | base64 -d
- 417 kubectl delete deployments.apps mydb
- 418 kubectl create deployment mynewdb --image=mariadb
- 419 kubectl set env deploy mynewdb --from=secret/dbpw --prefix=MYSQL_
- 420 history
- 421 ./countdown 1
- 422 kubectl api-resources | less
- 423 vim redis-deploy.yaml
- 424 kubectl config view
- 425 kubectl proxy --port=8001 &
- 426 kubectl create deploy curlginx --image=nginx --replicas=3
- 427 curl http://localhost:8001/version
- 428 curl http://localhost:8001/api/v1/namespaces/default/pods
- 429 curl http://localhost:8001/api/v1/namespaces/default/pods/testpod
- 430 curl h-XDELETE ttp://localhost:8001/api/v1/namespaces/default/pods/testpod
- 431 curl h-XDELETE http://localhost:8001/api/v1/namespaces/default/pods/testpod
- 432 curl -XDELETE http://localhost:8001/api/v1/namespaces/default/pods/testpod
- 433 kubectl get pods
- 434 kubectl auth can-i get pods
- 435 kubectl auth can-i get pods --as bob
- 436 ./countdown 13
- 437 vim mypod.yaml
- 438 kubectl apply -f mypod.yaml
- 439 kubectl get pods mypod -o yaml | grep ervice
- 440 kubectl get sa
- 441 kubectl get sa -A
- 442 kubectl exec -it mypod -- sh
- 443 cd
- 444 cd Downloads/
- 445 ls
- 446 tar xvf helm-v3.10.1-linux-amd64.tar.gz
- 447 sudo mv linux-amd64/helm /usr/local/bin/
- 448 helm version
- 449 kubectl get ns
- 450 history
- ####AIO COMMANDS
- student@student-virtual-machine:~/ckad$ history
- 1 history
- 2 sudo apt install vim git -y
- 3 git clone https://github.com/sandervanvugt/cka
- 4 cd cka
- 5 ls
- 6 sudo ./setup-container.sh
- 7 sudo ./setup-kubetools.sh
- 8 sudo kubeadm init
- 9 mkdir -p $HOME/.kube
- 10 kubectl get all
- 11 kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
- 12 kubectl get pods -n kube-system
- 13 source <(kubectl completion bash)
- 14 kubectl edit nodes student-virtual-machine
- 15 kubectl get pods -n kube-system
- 16 kubectl create deploy --image=nginx
- 17 kubectl create deploy testdep --image=nginx
- 18 kubectl get all
- 19 history
- 20 sudo poweroff
- 21 history
- 22 cd ckad
- 23 ls
- 24 git clone https://github.com/sandervanvugt/ckad
- 25 cd ckad
- 26 kubectl apply -f mypod.yaml
- 27 kubectl exec -it mypod -- sh
- 28 kubectl get pods -n kube-system
- 29 ping dl-cdn.alpinelinux.org
- 30 kubectl get pods -o wide
- 31 kubectl exec -it mypod -- sh
- 32 vim list-pods.yaml
- 33 vim list-pods-mysa-binding.yaml
- 34 kubectl create sa mysa
- 35 vim mysapod.yaml
- 36 kubectl get sa
- 37 kubectl get sa -n secret
- 38 vim mysapod.yaml
- 39 ./countdown 1
- 40 cd ../Downloads/
- 41 ls
- 42 tar xvf helm-v3.10.1-linux-amd64.tar.gz
- 43 sudo cp linux-amd64/helm /usr/local/bin/
- 44 kubectl get ns
- 45 helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
- 46 helm install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard
- 47 export POD_NAME=$(kubectl get pods -n default -l "app.kubernetes.io/name=kubernetes-dashboard,app.kubernetes.io/instance=kubernetes-dashboard" -o jsonpath="{.items[0].metadata.name}")
- 48 echo $POD_NAME
- 49 kubectl get pods
- 50 kubectl -n default port-forward $POD_NAME 8443:8443
- 51 bg
- 52 cp ~/.kube/config ~/
- 53 cd
- 54 kubectl get all
- 55 history | less
- 56 ls -l .kube/config
- 57 mkdir .dummy
- 58 sudo /etc/kubernetes/admin.conf .dummy/
- 59 sudo cp /etc/kubernetes/admin.conf .dummy/
- 60 chown student:student .dummy/admin.conf
- 61 sudo chown student:student .dummy/admin.conf
- 62 cd .dummy/
- 63 ls -l
- 64 mv admin.conf config
- 65 cd
- 66 helm repo add bitnami https://charts.bitnami.com/bitnami
- 67 helm repo list
- 68 helm search repo bitnami
- 69 helm repo update
- 70 helm install bitnami/mysql --generate-name
- 71 kubectl get all
- 72 helm show chart bitnami/mysql
- 73 helm show all bitnami/mysql
- 74 helm list
- 75 helm status mysql-1665680527
- 76 helm show values bitnami/nginx
- 77 helm pull bitnami/nginx
- 78 ls
- 79 tar xvf nginx-13.2.10.tgz
- 80 vim nginx/values.yaml
- 81 helm template --debug nginx
- 82 helm install -f nginx/values.yaml my-nginx nginx/
- 83 cd ckad/
- 84 ./countdown 12
- 85 kubectl create deploy blue-nginx --image=nginx:1.14 --replicas=3
- 86 kubectl expose deploy blue-nginx --port=80 --name=bgnginx
- 87 source <(kubectl completion bash)
- 88 kubectl get deploy blue-nginx -o yaml > green-nginx.yaml
- 89 vim green-nginx.yaml
- 90 kubectl create -f green-nginx.yaml
- 91 kubectl get pods
- 92 kubectl delete svc bgnginx; kubectl expose deploy green-nginx --port=80 --name=bgnginx
- 93 kubectl get endpoints
- 94 kubectl get pods -o wide
- 95 kubectl scale deploy blue-nginx --replicas=0
- 96 kubectl get deploy green-nginx -o yaml > green.yaml
- 97 vim green.yaml
- 98 kubectl create deploy old-nginx --image=nginx:1.14 --replicas=3 --dry-run=client -o yaml > ~/oldnginx.yaml
- 99 vim ~/oldnginx.yaml
- 100 kubectl create -f ~/oldnginx.yaml
- 101 kubectl expose deploy old-nginx --name=oldnginx --port=80 --selector type=canary
- 102 kubectl get svc,endpoints
- 103 minikube ssh
- 104 curl 10.103.42.159
- 105 kubectl cp old-nginx-9b8576459-cwpc2:/usr/share/nginx/html/index.html index.html
- 106 vim index.html
- 107 kubectl create cm canary --from-file=index.html
- 108 kubectl describe cm canary
- 109 vim canary.yaml
- 110 kubectl create -f canary.yaml
- 111 kubectl get svc,endpoints
- 112 curl 10.103.42.159
- 113 kubectl scale deployment new-nginx --replicas=3
- 114 curl 10.103.42.159
- 115 kubectl scale deployment old-nginx --replicas=0
- 116 curl 10.103.42.159
- 117 ./countdown 1
- 118 history
- 119 cat crd-object.yaml
- 120 kubectl create -f crd-object.yaml
- 121 kubectl api-resources | grep backup
- 122 cat crd-backup.yaml
- 123 kubectl create -f crd-backup.yaml
- 124 kubectl get backups
- 125 kubectl get backups -o yaml
- 126 kubectl api-resources | grep crd
- 127 history
Add Comment
Please, Sign In to add comment