Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- student@control:~$ history
- 1 kubectl create deploy nginx --image=nginx --dry-run -o yaml | sed '/null\|{}\|replicas/d;/status/,$d;s/Deployment/DaemonSet/g' > nginx-ds.yaml
- 2 vim nginx-ds.yaml
- 3 kubectl get ds
- 4 kubectl delete ds nginx-ds
- 5 kubectl create -f nginx-ds.yaml
- 6 kubectl delete -f nginx-ds.yaml
- 7 cd cka/
- 8 vim wg2.yaml
- 9 exit
- 10 sudo vim /etc/hosts
- 11 cat /etc/hosts
- 12 sudo apt install vim git bash-completion -y
- 13 git clone https://github.com/sandervanvugt/cka
- 14 cd cka
- 15 ls
- 16 vim setup-container.sh
- 17 ./setup-container.sh
- 18 ls
- 19 vim setup-kubetools.sh
- 20 vim setup-kubetools-ubuntu.sh
- 21 ./setup-kubetools-ubuntu.sh
- 22 history
- 23 cat /etc/hosts
- 24 sudo kubeadm init --help
- 25 sudo kubeadm init --pod-network-cidr=10.10.0.0/16
- 26 mkdir -p $HOME/.kube
- 27 sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
- 28 sudo chown $(id -u):$(id -g) $HOME/.kube/config
- 29 kubectl get all
- 30 kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"
- 31 kubectl get nodes
- 32 kubectl create testginx --image=nginx --replicas=3
- 33 kubectl create deploy testginx --image=nginx --replicas=3
- 34 kubectl get all
- 35 ls
- 36 history
- 37 ls
- 38 ./counter.sh 15
- 39 kubectl completion -h
- 40 source <(kubectl completion bash)
- 41 kubectl create namespace mynamespace
- 42 kubectl get ns
- 43 kubectl run mypod --image=alpine -n mynamespace -- sleep 3600
- 44 kubectl get pods mypod -n mynamespace -o yaml | less
- 45 history
- 46 ./counter.sh 15
- 47 vim wg.yaml
- 48 kubectl apply -f wg.yaml
- 49 kubectl get all
- 50 kubectl describe pod myapp-pod
- 51 history
- 52 ./counter.sh
- 53 vim nrv.yaml
- 54 kubectl apply -f nrv.yaml
- 55 kubectl get pods
- 56 kubectl describe pod ex3
- 57 kubectl delete pod ex3
- 58 ls -lrt
- 59 vim nrv.yaml
- 60 kubectl run busybox --image=busybox --dry-run=client -o yaml -- sleep 3600
- 61 vim aj.yaml
- 62 kubectl create -f aj.yaml
- 63 kubectl delete -f aj.yaml
- 64 kubectl create -f aj.yaml
- 65 kubectl get pods
- 66 kubectl describe myapp-pod
- 67 kubectl describe pod myapp-pod
- 68 kubectl logs myapp-pod
- 69 kubectl describe pod myapp-pod
- 70 ./counter.sh 5
- 71 vim wg2.yaml
- 72 kubectl create -f wg2.yaml
- 73 kubectl get all
- 74 kubectl get pod -o wide
- 75 vim svv.yaml
- 76 kubectl create -f svv.yaml
- 77 kubectl create deploy nginx --image=nginx --dry-run -o yaml | \ sed '/null\|{}\|replicas/d;/status/,$d;s/Deployment/DaemonSet/g' > nginx-ds.yaml kubectl apply -f nginx-ds.yaml
- 78 sudo apt install sed
- 79 kubectl create deploy nginx --image=nginx --dry-run -o yaml | \ sed '/null\|{}\|replicas/d;/status/,$d;s/Deployment/DaemonSet/g' > nginx-ds.yaml kubectl apply -f nginx-ds.yaml
- 80 kubectl create deploy nginx --image=nginx --dry-run -o yaml > nginx-ds.yaml
- 81 vim nginx-ds.yaml
- 82 kubectl create -f nginx-ds.yaml
- 83 vim nginx-ds.yaml
- 84 kubectl create -f nginx-ds.yaml
- 85 ./counter.sh 25
- 86 kubectl create deploy nginx --image=nginx --dry-run -o yaml | sed '/null\|{}\|replicas/d;/status/,$d;s/Deployment/DaemonSet/g' > nginx-ds.yaml
- 87 vim nginx-ds.yaml
- 88 ls -lrt
- 89 vim ex18.yaml
- 90 cd /etc/kubernetes/
- 91 ls
- 92 cd manifests/
- 93 ls
- 94 vim kube-scheduler.yaml
- 95 sudo vim kube-scheduler.yaml
- 96 ssh worker1
- 97 cd
- 98 kubectl run auto-web --image=nginx --dry-run=client -o yaml > auto-web.yaml
- 99 cat auto-web.yaml
- 100 kubectl get pods -o wide
- 101 kubectl create ns limited
- 102 kubectl create quota --help
- 103 kubectl create quota qtest --hard pods=3,cpu=100,memory=500Mi -n limited
- 104 kubectl describe ns limited
- 105 kubectl create deploy nginx --image=nginx --replicas=3 -n limited
- 106 kubectl get all -n limited
- 107 kubectl describe -n limited rs nginx-6799fc88d8
- 108 kubectl get all -n limited
- 109 kubectl set resources -h | less
- 110 kubectl set resources deploy nginx --requests cpu=100m,memory=5Mi --limits cpu=200m,memory=20Mi -n limited
- 111 kubectl get all -n limited
- 112 kubectl scale deploy nginx --replicas=5 -n limited
- 113 kubectl get all -n limited
- 114 kubectl describe ns limited
- 115 kubectl describe -n limited rs nginx-86d467bc98
- 116 kubectl delete deploy nginx -n limited
- 117 kubectl set resources deploy nginx --limits cpu=200m,memory=1Mi -n limited
- 118 kubectl create deploy nginx
- 119 kubectl create deploy nginx --image=nginx -n limited
- 120 kubectl set resources deploy nginx --limits cpu=200m,memory=1Mi -n limited
- 121 kubectl get deploy nginx -n limited -o yaml > oom.yaml
- 122 kubectl delete deploy nginx
- 123 kubectl delete deploy nginx -n limited
- 124 vim oom.yaml
- 125 kubectl create -f oom.yaml
- 126 kubectl get all -n limited
- 127 kubectl describe -n limited pod nginx-566bfb9779-ll295
- 128 history
- 129 sleep 120; cka/counter.sh 13
- 130 kubectl get nodes
- 131 kubectl get pods -o wide
- 132 kubectl get nodes
- 133 kubectl describe node worker1
- 134 kubectl get pods
- 135 kubectl get nodes
- 136 cka/counter.sh 5
- 137 cd cka
- 138 ls
- 139 cd ..
- 140 git clone https://github.com/sandervanvugt/ckad
- 141 cd ckad
- 142 ls
- 143 vim pv.yaml
- 144 kubectl create -f pv.yaml
- 145 kubectl api-resources | less
- 146 vim pvc.yaml
- 147 kubectl create -f pvc.yaml
- 148 kubectl get pv
- 149 kubectl get storageclass
- 150 kubectl pv-pod.yaml
- 151 vim pv-pod.yaml
- 152 kubectl create -f pv-pod.yaml
- 153 kubectl exec -it pv-pod -- touch /usr/share/nginx/html/hello.txt
- 154 kubectl describe pv pv-volume
- 155 ls /
- 156 kubectl get pods -o wide
- 157 kubectl explain pv.spec | less
- 158 kubectl explain pv.spec.iscsi
- 159 kubectl explain pv.spec.initiatorName
- 160 kubectl explain pv.spec.iscsi
- 161 vim pvc.yaml
- 162 cat /etc/os-release
- 163 history
- 164 man signals
- 165 kubectl get nodes
- 166 kubectl label nodes worker2 disktype=ssd
- 167 cd ../cka
- 168 vim selector-pod.yaml
- 169 kubectl create -f selector-pod.yaml
- 170 kubectl get pods
- 171 kubectl describe pod nginx
- 172 kubectl delete po nginx
- 173 vim selector-pod.yaml
- 174 kubectl create -f selector-pod.yaml
- 175 kubectl get pods
- 176 kubectl tainint nodes worker1 example-key=value1:NoSchedule
- 177 kubectl taint nodes worker1 example-key=value1:NoSchedule
- 178 kubectl describe nodes worker1 | less
- 179 kubectl get pods -o wide
- 180 kubectl create deploy nginx-taint --image=nginx --replicas=3
- 181 kubectl get pods -o wide
- 182 vim taint-toleration.yaml
- 183 kubectl create -f taint-toleration.yaml
- 184 kubectl get pods -o wide
- 185 vim sc.txt
- 186 kubectl get nodes -o wide
- 187 kubectl describe nodes control
- 188 #kubectl taint node <nodename> node-role.kubernetes.io/master:NoSchedule-
- 189 kubectl edit control
- 190 kubectl edit node control
- 191 kubectl cordon --help
- 192 kubectl drain --help
- 193 kubectl drain worker2
- 194 kubectl get pods -o wide
- 195 kubectl drain worker2 --force --ignore-daemonsets
- 196 kubectl get pods -o wide
- 197 kubectl edit worker1
- 198 kubectl edit node worker1
- 199 kubectl get pods
- 200 kubectl describe pod testginx-6b7bbdbc9d-kt4db
- 201 kubectl get all
- 202 kubectl describe node worker1
- 203 kubectl describe node worker1 | grep taint
- 204 kubectl describe node worker1 | less
- 205 kubectl edit node worker1
- 206 kubectl get pods
- 207 kubectl describe ns default
- 208 kubectl get nodes
- 209 kubectl kubectl uncordon worker2
- 210 kubectl uncordon worker2
- 211 kubectl get pods
- 212 #ETCDCTL_API=3 etcdctl --endpoints 10.2.0.9:2379 \
- 213 #ETCDCTL_API=3 etcdctl --endpoints $ENDPOINT snapshot save snapshotdb
- 214 apt install etcd
- 215 sudo apt install etcd
- 216 etcdctl history
- 217 history
- 218 ps aux | grep 2379
- 219 ETCDCTL_API=3 etcdctl --endpoints 127.0.0.1:2379 --cert=/etc/kubernetes/pki/etcd/server.crt --key=/etc/kubernetes/pki/etcd/server.key --cacert=/etc/kubernetes/pki/etcd/ca.crt snapshot save /tmp/etcdbackup
- 220 sudo ETCDCTL_API=3 etcdctl --endpoints 127.0.0.1:2379 --cert=/etc/kubernetes/pki/etcd/server.crt --key=/etc/kubernetes/pki/etcd/server.key --cacert=/etc/kubernetes/pki/etcd/ca.crt snapshot save /tmp/etcdbackup
- 221 sudo ETCDCTL_API=3 etcdctl --endpoints 127.0.0.1:2379 --cert=/etc/kubernetes/pki/etcd/server.crt --key=/etc/kubernetes/pki/etcd/server.key --cacert=/etc/kubernetes/pki/etcd/ca.crt snapshot save /tmp/etcdback
- 222 mkdir -p /var/exam
- 223 sudo mkdir -p /var/exam
- 224 sudo cp /tmp/etcdback /var/exam
- 225 #sudo ETCDCTL_API=3 etcdctl --endpoints 127.0.0.1:2379 --cert=/etc/kubernetes/pki/etcd/server.crt --key=/etc/kubernetes/pki/etcd/server.key --cacert=/etc/kubernetes/pki/etcd/ca.crt snapshot save /tmp/etcdback
- 226 ps aux | grep server.crt
- 227 ETCDCTL_API=3 etcdctl --help
- 228 ./counter.sh 12
- 229 vim ~/.kube/config
- 230 sudo useradd -G sudo anna
- 231 id
- 232 sudo passwd anna
- 233 su - anna
- 234 sudo userdel -r anna
- 235 sudo useradd -m -G sudo anna
- 236 sudo passwd anna
- 237 su - anna
- 238 vim podaccessrole.yaml
- 239 kubectl create -f podaccessrole.yaml
- 240 vim rolebinding.yaml
- 241 kubectl create -f rolebinding.yaml
- 242 kubectl run rolepod --image-=nginx
- 243 kubectl run rolepod --image=nginx
- 244 kubectl get pods
- 245 su - anna
- 246 kubectl auth can-i get pods --as anna
- 247 kubectl auth can-i get pods --as bob
- 248 ./counter.sh 27
- 249 kubectl top
- 250 kubectl top pod
- 251 git clone https://github.com/kubernetes-sigs/metrics-server
- 252 cd metrics-server/
- 253 ls
- 254 cd manifests/
- 255 ls
- 256 kubectl create -f base/
- 257 cd base
- 258 cd ..
- 259 kubectl delete -f manifests/base/
- 260 kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
- 261 kubectl -n kube-system get pods
- 262 kubectl -n kube-system edit deploy metrics-server
- 263 kubectl -n kube-system get pods
- 264 kubectl get pods
- 265 kubectl get pods -n kube-system
- 266 kubectl top pod
- 267 cd
- 268 kubectl get all -n kube-system
- 269 kubectl delete -n kube-system daemonset weave-net
- 270 kubectl get all -n kube-system
- 271 kubectl create -f https://docs.projectcalico.org/manifests/tigera-operator.yaml
- 272 wget https://docs.projectcalico.org/manifests/custom-resources.yaml
- 273 vim custom-resources.yaml
- 274 kubectl create -f custom-resources.yaml
- 275 kubectl get pods -n calico-system
- 276 kubectl get all -n calico-system
- 277 kubectl logs -n calico-system calico-node-bx9l2
- 278 kubectl create deploy testing --image=nginx --relicas=3
- 279 kubectl create deploy testing --image=nginx --replicas=3
- 280 kubectl get all
- 281 kubectl get all -o wide
- 282 kubectl get all -n calico-system
- 283 cd cka
- 284 vim nwpolicy-complete-example.yaml
- 285 kubectl apply -f nwpolicy-complete-example.yaml
- 286 kubectl expose pod nginx --port=80
- 287 kubectl describe svc nginx
- 288 kubectl exec -it busybox -- wget --spider --timeout=1 nginx
- 289 kubectl label pod busybox access=true
- 290 kubectl exec -it busybox -- wget --spider --timeout=1 nginx
- 291 kubectl get all -n calico-system
- 292 kubectl get pods -o wide
- 293 kubectl get svc
- 294 kubectl get pods -n kube-system
- 295 sudo reboot
- 296 kubectl get all -n calico-system
- 297 kubectl get all
- 298 sudo poweroff
- 299 history
Add Comment
Please, Sign In to add comment