Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement