Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 lscpu
- 2 free -m
- 3 df -h
- 4 git clone https://github.com/sandervanvugt/cka
- 5 cd cka
- 6 ls
- 7 ls *sh
- 8 ./setup-container.sh
- 9 ls *sh
- 10 less setup-kubetools-specific-version.sh
- 11 ./setup-kubetools-specific-version.sh
- 12 sudo ./setup-kubetools-specific-version.sh
- 13 history
- 14 sudo kubeadm init
- 15 vim setup-kubetools-specific-version.sh
- 16 ./setup-kubetools-specific-version.sh
- 17 sudo ./setup-kubetools-specific-version.sh
- 18 sudo kubeadm -h
- 19 sudo kubeadm reset
- 20 sudo kubeadm init
- 21 vim ./setup-kubetools-specific-version.sh
- 22 sudo apt remove -y kubelet=1.24.3-00 kubeadm=1.24.3-00 kubectl=1.24.3-00
- 23 sudo apt remove -y --allow-change-held-packages kubelet=1.24.3-00 kubeadm=1.24.3-00 kubectl=1.24.3-00
- 24 sudo ./setup-kubetools-specific-version.sh
- 25 sudo kubeadm init
- 26 kubectl get pods -A
- 27 less setup-kubetools.sh
- 28 kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.25.0/manifests/calico.yaml
- 29 kubectl get pods -n kube-system
- 30 kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.25.0/manifests/calico.yaml
- 31 kubectl get nodes
- 32 history
- 33 kubectl get nodes
- 34 ./counter.sh 5
- 35 history
- 36 git pull
- 37 cd ..
- 38 rm -rf cka
- 39 git clone https://github.com/sandervanvugt/cka
- 40 cd cka
- 41 cat cluster-setup.txt
- 42 kubectl create ns mynamespace
- 43 kubectl run task2pod --image=alpine -n mynamespace -- /bin/sh -c 'sleep 3600'
- 44 kubectl get ns
- 45 kubectl get pods -n mynamespace
- 46 source <(kubectl completion bash)
- 47 kubectl get pods -n mynamespace -o yaml
- 48 kubectl run task2pod2 --image=alpine -n mynamespace -- sleep 3600
- 49 kubectl get pods -n mynamespace task2pod2 -o yaml | less
- 50 history
- 51 vim co3.yaml
- 52 vim jc3.yaml
- 53 kubectl apply -f jc3.yaml
- 54 kubectl get pods
- 55 kubectl logs task3pod
- 56 kubectl describe pod task3pod
- 57 kubectl run dummy --image=busybox --dry-run -o yaml -- sleep 3600
- 58 vim jc3.yaml
- 59 kubectl delete pod task3pod
- 60 kubectl apply -f jc3.yaml
- 61 kubectl get pods
- 62 history
- 63 vim jc3.yaml
- 64 kubectl create deployment nginx-ex5 --image=nginx --replicas=2
- 65 kubectl get all
- 66 kubectl scale deployment nginx-ex5 --replicas 4
- 67 kubectl get all
- 68 kubectl create ns limited
- 69 kubectl create quota -h | less
- 70 kubectl create quota --hard pods=3,cpu=100m,memory=500Mi -n limited
- 71 kubectl create quota qtest --hard pods=3,cpu=100m,memory=500Mi -n limited
- 72 kubectl describe quota -n limited
- 73 kubectl describe ns limited
- 74 kubectl create deployment nginx --image=nginx --replicas=3 -n limited
- 75 kubectl get all -n limited
- 76 kubectl get -n limited rs nginx-77b4fdf86c
- 77 kubectl describe -n limited rs nginx-77b4fdf86c
- 78 kubectl -n limited set resources -h
- 79 kubectl -n limited set resources -h | less
- 80 kubectl -n limited set resources deploy nginx --requests cpu=100m,memory=5Mi --limits cpu=200m,memory=20Mi
- 81 kubectl get pods -n limited
- 82 kubectl get all -n limited
- 83 kubectl describe ns limited
- 84 kubectl edit -n limited quota qtest
- 85 kubectl get all -n limited
- 86 kubectl scale deployment -n limited --replicas 4
- 87 kubectl scale deployment nginx -n limited --replicas 4
- 88 kubectl scale deployment nginx -n limited --replicas 3
- 89 kubectl get all -n limited
- 90 vim jh7.txt
- 91 kubectl describe ns limited
- 92 kubectl run testpod --image=nginx -n limited
- 93 vim jh7.txt
- 94 kubectl run testpod --image=busybox --dry-run=client -o yaml -n limited -- sleep 3600
- 95 kubectl run testpod --image=busybox --dry-run=client -o yaml -n limited -- sleep 3600 > mycode.yaml
- 96 kubectl get pods -n limited nginx-8647459fc7-pzlkt
- 97 kubectl get pods -n limited nginx-8647459fc7-pzlkt -o yaml
- 98 vim mycode.yaml
- 99 kubectl apply -f mycode.yaml
- 100 historey
- 101 history
- 102 vim jh7.txt
- 103 vim nwpolicy-complete-example.yaml
- 104 kubectl apply -f nwpolicy-complete-example.yaml
- 105 kubectl expose pod nginx --port=80
- 106 kubectl exec -it busybox -- wget --spider --timeout=1 nginx
- 107 kubectl get pods --show-labels
- 108 kubectl label pod busybox access=true
- 109 kubectl exec -it busybox -- wget --spider --timeout=1 nginx
- 110 kubectl get pods --show-labels
- 111 kubectl create ns nwp-namespace
- 112 vim nwp-lab9-1.yaml
- 113 kubectl apply -f nwp-lab9-1.yaml
- 114 kubectl expose pod nwp-nginx --port=80
- 115 kubectl get svc
- 116 kubectl exec -it nwp-busybox -n nwp-namespace -- wget --spider --timeout=1 nwp-nginx
- 117 kubectl exec -it nwp-busybox -n nwp-namespace -- nslookup nwp-nginx
- 118 kubectl get svc,pods -n kube-system
- 119 kubectl exec -it nwp-busybox -n nwp-namespace -- nslookup nwp-nginx.default.svc.cluster.local
- 120 kubectl get svc
- 121 kubectl exec -it nwp-busybox -n nwp-namespace -- wget --spider --timeout=1 nwp-nginx.default.svc.cluster.local
- 122 vim nwp-lab9-2.yaml
- 123 kubectl apply -f nwp-lab9-2.yaml
- 124 kubectl exec -it nwp-busybox -n nwp-namespace -- wget --spider --timeout=1 nwp-nginx.default.svc.cluster.local
- 125 kubectl create deploy busybox --image=busybox -- sleep 3600
- 126 kubectl exec -it busybox-c95495658-8jnj5 -- wget --spider --timeout=1 nwp-nginx
- 127 kubectl default -f nwp-lab9-2.yaml
- 128 kubectl delete -f nwp-lab9-2.yaml
- 129 vim jh12.yaml
- 130 kubectl apply -f jh12.yaml
- 131 kubectl create ns restricted
- 132 kubectl apply -f jh12.yaml
- 133 kubectl delete -f jh12.yaml
- 134 kubectl apply -f jh12.yaml
- 135 vim jh12.yaml
- 136 kubectl exec -it busybox -- wget --spider --timeout=1 nginx.restricted.svc.cluster.local
- 137 kubectl get pods --show-labels
- 138 kubectl exec -it busybox-c95495658-8jnj5 -- wget --spider --timeout=1 nginx.restricted.svc.cluster.local
- 139 history
- 140 ./counter.sh 5
- 141 kubectl -h | less
- 142 kubectl cordon -h | less
- 143 kubectl drain -h | less
- 144 kubectl drain worker2
- 145 kubectl drain worker2 --ignore-daemonsets --force
- 146 kubectl get pods -o wide
- 147 kubectl get nodes
- 148 kubectl edit worker2
- 149 kubectl edit node worker2
- 150 kubectl uncordon worker2
- 151 kubectl get nodes
- 152 kubectl edit node worker2
- 153 kubectl get pods -A -o wide
- 154 kubectl get ds -A
- 155 kubectl get pods -o wide
- 156 kubectl create newdep --image=nginx --replicas=5
- 157 kubectl create deploy newdep --image=nginx --replicas=5
- 158 kubectl get pods -o wide
- 159 kubectl scale deploy nginx-ex5 --replicas=1
- 160 kubectl scale deploy nginx-ex5 --replicas=4
- 161 kubectl get pods -o wide
- 162 kubectl label nodes worker2 disktype=ssd
- 163 vim selector-pod.yaml
- 164 kubectl cordon worker2
- 165 kubectl apply -f selector-pod.yaml
- 166 kubectl get pods -o wide
- 167 kubectl describe pod nginx
- 168 kubectl uncordon worker2
- 169 kubectl get pods -o wide
- 170 kubectl edit node control
- 171 kubectl get pods -n kube-system -o wide
- 172 kubectl edit -n kube-system pod coredns-5d78c9869d-
- 173 kubectl edit -n kube-system pod coredns-5d78c9869d-2brbt
- 174 kubectl taint nodes worker1 example-key=value1:NoSchedule
- 175 kubectl describe node worker1
- 176 kubectl describe node worker1 | less
- 177 kubectl create deploy nginx-taint --image=nginx --replicas=5
- 178 kubectl get pods -o wide
- 179 kubectl delete deploy nginx-taint
- 180 vim taint-toleration.yaml
- 181 kubectl create -f taint-toleration.yaml
- 182 kubectl get pods -o wide
- 183 kubectl delete -f taint-toleration.yaml
- 184 vim taint-toleration.yaml
- 185 kubectl describe node worker1
- 186 vim taint-toleration.yaml
- 187 kubectl create -f taint-toleration.yaml
- 188 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement