Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- student@control:~/cka$ history
- 1 sudo apt install vim git -y
- 2 vim /etc/hosts
- 3 sudo -i
- 4 git clone https://github.com/sandervanvugt/cka
- 5 ip a
- 6 ip route show
- 7 sudo -i
- 8 top
- 9 ./cka/
- 10 ./cka/counter.sh 10
- 11 exit
- 12 history
- 13 git clone https://github.com/sandervanvugt/cka
- 14 cd cka
- 15 ls *sh
- 16 sudo ./setup-container.sh
- 17 ls *sh
- 18 sudo ./setup-kubetools.sh
- 19 history
- 20 sudo kubeadm init
- 21 kubectl get all
- 22 kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.0/manifests/tigera-operator.yaml
- 23 kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.0/manifests/custom-resources.yaml
- 24 kubectl get ns
- 25 kubectl get pods
- 26 kubectl get pods -n tigera-operator
- 27 kubectl get pods -n kube-system
- 28 kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.0/manifests/custom-resources.yaml
- 29 kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.0/manifests/custom-resources.yaml
- 30 kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.25.0/manifests/calico.yaml
- 31 kubectl get ns
- 32 kubectl get pods
- 33 kubectl get pods -n kube-system
- 34 kubectl get nodes
- 35 kubectl create deploy testginx --image=nginx
- 36 kubectl get pods
- 37 kubectl get nodes
- 38 history
- 39 kubectl get pods -n kube-system
- 40 source <(kubectl completion bash)
- 41 kubectl create ns mynamespace
- 42 kubectl run task2pod --image=alpine -- sleep 3600
- 43 kubectl run -n mynamespace task2pod --image=alpine -- sleep 3600
- 44 kubectl get pods -n mynamespace
- 45 kubectl edit -n mynamespace pod task2pod
- 46 history
- 47 vim lab3.yaml
- 48 kubectl apply -f lab3.yaml
- 49 kubectl get pods
- 50 kubectl describe pod task3pod
- 51 kubectl run failingbox --image=busybox
- 52 kubectl get pods
- 53 kubectl delete pod failingbox
- 54 kubectl run succesfulbox --image=busybox -- sleep 3600
- 55 kubectl get pods
- 56 kubectl get pods -o yaml
- 57 kubectl get pods succesfulbox -o yaml | less
- 58 kubectl create quota -h | less
- 59 kubectl create ns limited
- 60 kubectl create quota qtest --hard pods=3,cpu=100m.memory=500Mi -n limited
- 61 kubectl create quota qtest --hard pods=3,cpu=100m,memory=500Mi -n limited
- 62 kubectl describe quota -n limited
- 63 kubectl create deploy nginx --image=nginx:latest --replicas=3 -n limited
- 64 kubectl get all -n limited
- 65 kubectl describe -n limited rs/nginx-7bf8c77b5b
- 66 kubectl set -h
- 67 kubectl set resources -h
- 68 kubectl set resources -n limited --requests cpu=100m,memory=5Mi --limits cpu=200m,memory=20Mi
- 69 kubectl set resources -n limited --requests cpu=100m,memory=5Mi --limits cpu=200m,memory=20Mi deploy nginx
- 70 kubectl get all -n limited
- 71 kubectl describe -n limited
- 72 kubectl describe ns limited
- 73 kubectl edit ns limited
- 74 kubectl edit -n limited quota qtest
- 75 kubectl get all -n limited
- 76 kubectl scale -n limited deploy nginx --replicas=3
- 77 kubectl get all -n limited
- 78 ./counter.sh 8
- 79 history
- 80 cat /etc/os-release
- 81 history | less
- 82 vim nwpolicy-complete-example.yaml
- 83 kubectl apply -f nwpolicy-complete-example.yaml
- 84 kubectl expose pod nginx --port=80
- 85 kubectl describe svc nginx
- 86 kubectl exec -it busybox -- wget --spider --timeout=1 nginx
- 87 kubectl label pod busybox access=true
- 88 kubectl exec -it busybox -- wget --spider --timeout=1 nginx
- 89 kubectl create ns nwp-namespace
- 90 vim nwp-lab9-1.yaml
- 91 kubectl create -f nwp-lab9-1.yaml
- 92 kubectl expose pod nwp-nginx --port=80
- 93 kubectl exec -it newp-busybox -n nwp-namespace -- wget --spider --timeout=1 nwp-nginx
- 94 kubectl exec -it nwp-busybox -n nwp-namespace -- wget --spider --timeout=1 nwp-nginx
- 95 kubectl exec -it nwp-busybox -n nwp-namespace -- nslookup nwp-nginx
- 96 kubectl exec -it nwp-busybox -n nwp-namespace -- nslookup nwp-nginx.default.svc.cluster.local
- 97 kubectl get svc
- 98 kubectl exec -it nwp-busybox -n nwp-namespace -- wget --spider --timeout=1 nwp-nginx.default.svc.cluster.local
- 99 vim nwp-lab9-1.yaml
- 100 vim nwp-lab9-2.yaml
- 101 kubectl create -f nwp-lab9-2.yaml
- 102 kubectl exec -it nwp-busybox -n nwp-namespace -- wget --spider --timeout=1 nwp-nginx.default.svc.cluster.local
- 103 kubectl create deployment busybox --image=busybox --sleep 3600
- 104 kubectl create deployment busybox --image=busybox -- sleep 3600
- 105 kubectl exec -it busybox-c95495658-ljctl -- wget --spider --timeout=1 nwp-nginx
- 106 kubectl delete -f nwp-lab9-2.yaml
- 107 echo google for ahmetdb
- 108 ./counter.sh 20
- 109 vim rh.yaml
- 110 ./counter.sh 5
- 111 vim rh.yaml
- 112 vim wz.yaml
- 113 history
- 114 vim wz-lab6.yaml
- 115 kubectl get pods
- 116 kubectl get pods busybox -o yaml | less
- 117 vim wz-lab6.yaml
- 118 kubectl apply -f wz-lab6.yaml
- 119 vim wz-lab6.yaml
- 120 kubectl apply -f wz-lab6.yaml
- 121 kubectl expose pod task6pod --port=80
- 122 kubectl get svc
- 123 kubectl edit svc task6pod
- 124 kubectl get svc
- 125 curl 192.168.29.81:31761
- 126 kubectl get pods task6pod -o yaml | less
- 127 kubectl exec -it task6pod -- sh
- 128 kubectl exec -it task6pod -c nginx -- sh
- 129 curl 192.168.29.81:31761
- 130 kubectl delete -f wz-lab6.yaml
- 131 vim wz-lab6.yaml
- 132 kubectl apply -f wz-lab6.yaml
- 133 kubectl expose pod task6podsvv --type=NodePort
- 134 kubectl expose pod task6podsvv --type=NodePort --port=80
- 135 kubectl get svc
- 136 curl 192.168.29.81:30130
- 137 history
- 138 history -d 134
- 139 ./counter.sh 5
- 140 vim task4pod.yaml
- 141 kubectl apply -f task4pod.yaml
- 142 vim task4pod.yaml
- 143 kubectl apply -f task4pod.yaml
- 144 kubectl get pods
- 145 vim wz4.yaml
- 146 kubectl apply -f wz4.yaml
- 147 kubectl get pods
- 148 cd
- 149 ls
- 150 tar -xvf helm-v3.12.0-linux-amd64.tar.gz
- 151 sudo cp linux-amd64/helm /usr/local/bin/
- 152 helm --version
- 153 helm version
- 154 helm upgrade --install ingress-nginx ingress-nginx --repo https://kubernetes.github.io/ingress-nginx --namespace ingress-nginx --create-namespace
- 155 kubectl get pods -n ingress-nginx
- 156 kubectl get ns
- 157 kubectl create deploy nginxsvc --image=nginx --port=80 --replicas=3
- 158 kubectl get all --selector app=nginxsvc
- 159 kubectl get all --selector app=nginxsvc -o wide
- 160 kubectl expose deploy nginxsvc
- 161 kubectl get all --selector app=nginxsvc -o wide
- 162 kubectl describe svc nginxsvc
- 163 kubectl create ingress nginxsvc --class=nginx --rule=nginxsvc.info/*=nginxsvc:80
- 164 kubectl port-forward -n ingress-nginx svc/ingress-nginx-controller 8080:80
- 165 bg
- 166 sudo vim /etc/hosts
- 167 curl nginxsvc.info:8080
- 168 kubectl edit svc nginxsvc
- 169 curl nginxsvc.info:8080
- 170 kubectl get ingress
- 171 kubectl describe ingress nginxsvc
- 172 kubectl describe svc nginxsvc
- 173 kubectl edit svc nginxsvc
- 174 kubectl describe svc nginxsvc
- 175 kubectl describe ingress nginxsvc
- 176 curl nginxsvc.info:8080
- 177 history
- 178 kubectl get pods
- 179 kubectl get pods busybox -o yaml | less
- 180 kubectl get pods -n kube-system
- 181 kubectl get pods -n kube-system calico-node-5pmxr -o yaml | less
- 182 kubectl get roles
- 183 kubectl get clusterroles
- 184 kubectl get clusterroles | grep calico
- 185 kubectl get clusterrole calico-node -o yaml | less
- 186 kubectl get clusterrolebinding
- 187 kubectl get clusterrolebinding | grep calic
- 188 kubectl get clusterrolebinding calico-node -o yaml | less
- 189 kubectl create role --help | less
- 190 history
- 191 vim wz10.txt
- 192 kubectl create sa mysa
- 193 kubectl get sa
- 194 kubectl run mypod --dry-run=client -o yaml > mypod.yaml
- 195 kubectl run mypod --dry-run=client --image=nginx -o yaml > mypod.yaml
- 196 vim mypod.yaml
- 197 kubectl apply -f mypod.yaml
- 198 kubectl get pod mypod -o yaml | less
- 199 history
- 200 kubectl get pods -o wide
- 201 kubectl get pods -n kube-system -o wide
- 202 kubectl edit node control
- 203 kubectl get pods -n kube-system etcd-control -o yaml | less
- 204 cd cka/
- 205 ./counter.sh 5
- 206 kubectl edit
- 207 kubectl edit node control
- 208 kubectl create deploy taintdeploy --image=nginx --replicas=3
- 209 kubectl get pods -o wide | grep taintd
- 210 kubectl taint -h | less
- 211 kubectl get nodes
- 212 kubectl cordon -h | less
- 213 kubectl drain -h | less
- 214 kubectl cordon worker1
- 215 kubectl get nodes
- 216 kubectl edit node worker1
- 217 kubectl uncordon worker1
- 218 kubectl edit node worker1
- 219 top
- 220 kubectl top
- 221 kubectl top pod
- 222 kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
- 223 kubectl -n kube-system get pods
- 224 kubectl -n kube-system edit deployments.apps metrics-server
- 225 kubectl -n kube-system get pods
- 226 kubectl top pods
- 227 history
- 228 kubectl -n kube-system get pods
- 229 kubectl top pod
- 230 cd /etc/kubernetes/manifests/
- 231 ls
- 232 vim etcd.yaml
- 233 sudo vim etcd.yaml
- 234 cd
- 235 sudo apt install etcd-client
- 236 sudo reboot
- 237 kubectl get all
- 238 sudo etcdctl --help
- 239 sudo ETCDCTL_API=3 etcdctl --help
- 240 sudo ETCDCTL_API=3 etcdctl snapshot save --help
- 241 sudo ls -l /etc/kubernetes/pki/etcd/
- 242 ps aux | grep etcd
- 243 sudo ETCDCTL_API=3 etcdctl --endpoints=localhost:2379 --cacert /etc/kubernetes/pki/etcd/ca.crt --cert /etc/kubernetes/pki/etcd/server.crt --key /etc/kubernetes/pki/etcd/server.key get / --prefix --keys-only
- 244 sudo ETCDCTL_API=3 etcdctl --endpoints=localhost:2379 --cacert /etc/kubernetes/pki/etcd/ca.crt --cert /etc/kubernetes/pki/etcd/server.crt --key /etc/kubernetes/pki/etcd/server.key get snapshot save /tmp/etcdbackup.db
- 245 sudo ETCDCTL_API=e etcdctl --write-out=table snapshot status /tmp/etcdbackup.db
- 246 sudo ETCDCTL_API=3 etcdctl --write-out=table snapshot status /tmp/etcdbackup.db
- 247 ls -l /tmp/
- 248 sudo ETCDCTL_API=3 etcdctl --endpoints=localhost:2379 --cacert /etc/kubernetes/pki/etcd/ca.crt --cert /etc/kubernetes/pki/etcd/server.crt --key /etc/kubernetes/pki/etcd/server.key snapshot save /tmp/etcdbackup.db
- 249 sudo ETCDCTL_API=3 etcdctl --write-out=table snapshot status /tmp/etcdbackup.db
- 250 cp /tmp/etcdbackup.db /tmp/etcdbackup.db.2
- 251 cp /tmp/etcdbackup.db /tmp/etcdbackup.db.3
- 252 history
- 253 kubectl get deploy
- 254 kubectl delete --all deploy
- 255 cd /etc/kubernetes/manifests/
- 256 ls
- 257 sudo mv * ..
- 258 sudo crictl ps
- 259 sudo ETCDCTL_API=3 etcdctl snapshot restore /tmp/etcdbackup.db --data-dir /var/lib/etcd-backup
- 260 ls -l /var/lib/etcd-backup/
- 261 sudp ls -l /var/lib/etcd-backup/
- 262 sudo ls -l /var/lib/etcd-backup/
- 263 sudo vi /etc/kubernetes/etcd.yaml
- 264 sudo mv ../*.yaml .
- 265 sudo crictl ps
- 266 kubectl get deploy
- 267 history
- 268 cd
- 269 cd cka/
- 270 ./counter.sh 22
- 271 kubectl --version
- 272 kubectl version
- 273 ./counter.sh 12
- 274 vim je.yaml
- 275 kubectl taint nodes worker1 nosched=true:NoSchedule
- 276 kubectl get nodes
- 277 kubectl create deploy tt image=nginx --replicas=3
- 278 kubectl create deploy tt --image=nginx --replicas=3
- 279 kubectl get pods --selector app=tt
- 280 kubectl get pods --selector app=tt -o wide
- 281 kubect get nodes
- 282 kubectl get nodes
- 283 kubectl get nodes -o wide
- 284 kubectl edit node worker1
- 285 vim je.yaml
- 286 kubectl apply -f je.yaml
- 287 kubectl get pod nginxtaint -o wide
- 288 kubectl edit node worker1
- 289 kubectl get nodes
- 290 kubectl describe node worker2
- 291 kubectl describe node worker2 | less
- 292 kubect get nodes
- 293 kubectl get nodes
- 294 kubectl label nodes worker2 disktype=ssd
- 295 vim selector-pod.yaml
- 296 kubectl apply -f selector-pod.yaml
- 297 kubectl get pods nginx -o wide
- 298 vim selector-pod.yaml
- 299 kubectl apply -f selector-pod.yaml
- 300 kubectl get pods nginxxxx
- 301 source <(kubectl completion bash)
- 302 kubectl describe pod nginxxxx
- 303 kubectl label nodes worker1 disktype=xxd
- 304 kubectl get pods nginxxxx -w
- 305 ./counter.sh 5
- 306 kubectl get pods
- 307 kubectl get pods -o wide
- 308 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement