Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [sudo] password for student:
- root@worker1:~# history
- 1 git clone https://github.com/sandervanvugt/cka
- 2 cd cka
- 3 ./setup-container.sh
- 4 ./setup-kubetools.sh
- 5 kubeadm join 192.168.29.138:6443 --token y8o8ro.7s54dcqkvidmqrkg --discovery-token-ca-cert-hash sha256:ebf8e84beee89cc71e6cfcf17c3772bfdf49149d1a8efe71ddeee5f623bee313
- 6 mkdir /etc/kubernetes/static
- 7 cd /etc/kubernetes/static/
- 8 vim auto-web.yaml
- 9 ps aux | grep kubelet
- 10 cd /etc/kubernetes/
- 11 ls
- 12 cat kubelet.conf
- 13 ps aux | grep kubelet
- 14 vim /var/lib/kubelet/config.yaml
- 15 ls manifests/
- 16 systemctl restart kubelet
- 17 exit
- 18 history
- root@worker1:~# grep taticPod /var/lib/kubelet/config.yaml
- staticPodPath: /etc/kubernetes/static
- student@control:~/cka$ history
- 1 cat /etc/hosts
- 2 free -m
- 3 sudo vim /etc/fstab
- 4 swapoff /swap.img
- 5 sudo swapoff /swap.img
- 6 free -m
- 7 sudo -i
- 8 sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
- 9 sudo chown $(id -u):$(id -g) $HOME/.kube/config
- 10 kubectl get all
- 11 kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
- 12 kubectl get ns
- 13 kubectl get pods -A
- 14 cat /tmp/todo.txt
- 15 kubectl get nodes
- 16 history
- 17 git clone https://github.com/sandervanvugt/cka
- 18 cka/counter.sh 15
- 19 cd cka
- 20 ls
- 21 ./counter.sh 15
- 22 sudo -i
- 23 kubectl get nodes
- 24 history
- 25 wget https://docs.projectcalico.org/manifests/calico.yaml
- 26 vim calico.yaml
- 27 kubectl get daemonset
- 28 kubectl get daemonset -A
- 29 kubectl get pods -A
- 30 kubectl get pods -A -o wide
- 31 kubectl get pods -A -o wide | grep calico
- 32 history
- 33 kubectl create ns mynamespace
- 34 kubectl run alpine --image=alpine -- sleep 3600 -n mynamespace
- 35 kubectl get pods -A
- 36 kubectl run alpine --image=alpine -n mynamespace -- sleep 3600
- 37 kubectl get pods -A
- 38 kubectl completion -h
- 39 source <(kubectl completion bash)
- 40 kubectl describe pod alpine
- 41 kubectl logs alpine
- 42 kubectl run alpine --image=alpine -- sleep 3600 -n mynamespace
- 43 kubectl delete pod alpine
- 44 ./counter.sh 15
- 45 vim bi-doesnwork.yaml
- 46 kubectl create -f bi-doesnwork.yaml
- 47 kubectl get all
- 48 kubectl get pods -A
- 49 history | grep calico
- 50 ./counter.sh 5
- 51 vim knabc.yaml
- 52 vim ex4.yaml
- 53 kubectl run blah --image=busybox --dry-run=client -o yaml -- mkdir /data; touch /data/myfile.txt
- 54 kubectl run blah --image=busybox --dry-run=client -o yaml -- "mkdir /data; touch /data/myfile.txt"
- 55 vim ex4.yaml
- 56 kubectl create -f ex4.yaml
- 57 kubectl get pods
- 58 kubectl delete -f ex4.yaml
- 59 vim ex4.yaml
- 60 kubectl create -f ex4.yaml
- 61 kubectl get pods
- 62 kubectl describe pod init-demo
- 63 vim ex4.yaml
- 64 kubectl delete pod init-demo
- 65 kubectl create -f ex4
- 66 kubectl create -f ex4.yaml
- 67 kubectl get pods
- 68 kubectl describe pod init-demo
- 69 kubectl delete pod init-demo
- 70 vim ex4.yaml
- 71 kubectl create -f ex4.yaml
- 72 kubectl get pods
- 73 kubectl describe pod init-demo
- 74 kubectl delete pod init-demo
- 75 vim ex4.yaml
- 76 kubectl create -f ex4.yaml
- 77 kubectl get pods
- 78 kubectl delete pod init-demo
- 79 vim ex4.yaml
- 80 kubectl create -f ex4.yaml
- 81 kubectl get pods
- 82 vim ex4.yaml
- 83 kubectl describe pod init-demo
- 84 vim ex4.yaml
- 85 kubectl delete pod init-demo
- 86 kubectl create -f ex4.yaml
- 87 kubectl get pods
- 88 vim ex4.yaml
- 89 ./counter.sh 18
- 90 ./counter.sh 7
- 91 sudo -i
- 92 kubectl get pods
- 93 kubectl --help | less
- 94 kubectl cordon --help | less
- 95 kubectl drain --help | less
- 96 kubectl get pods -A
- 97 kubectl get pods -A -o wide
- 98 kubectl drain worker2
- 99 kubectl drain worker2 --ignore-daemonsets --force
- 100 kubectl get pods -o wide -A
- 101 kubectl describe node worker2
- 102 kubectl describe node worker2 | less
- 103 kubectl get nodes
- 104 kubectl uncordon worker2
- 105 ./counter.sh 12
- 106 ./counter.sh 5
- 107 kubectl get nodes
- 108 ls -l ~/.kube/
- 109 sudo cp /etc/kubernetes/admin.conf ~/.kube/config
- 110 ls -l ~/.kube/
- 111 chown student:student ~/.kube/config
- 112 sudo chown student:student ~/.kube/config
- 113 ls -l ~/.kube/
- 114 kubectl get nodes
- 115 kubectl edit node control
- 116 kubectl create deploy --image=nginx --replicas=3 tttest
- 117 kubectl get pods -o wide
- 118 kubectl config view
- 119 vim ~/.kube/config
- 120 kubectl label nodes worker2 disktype=ssd
- 121 kubectl get nodes --show-labels
- 122 vim selector-pod.yaml
- 123 kubectl apply -f selector-pod.yaml
- 124 kubectl get pods -o wide
- 125 kubectl delete pod nginx
- 126* kubectl label node worker2 disktype=ssd
- 127 kubectl edit node worker2
- 128 kubectl apply -f selector-pod.yaml
- 129 kubectl get pods
- 130 kubectl describe pod nginx
- 131 kubectl label nodes worker2 disktype=ssd
- 132 kubectl get pods
- 133 kubectl get daemonset
- 134 kubectl get daemonset -A
- 135 kubectl get daemonset -n kube-system calico-node -o yaml | less
- 136 kubectl taint nodes worker1 example-key=value1:NoSchedule
- 137 kubectl describe nodes worker1 | less
- 138 kubectl create deploy nginx-taint --image=nginx --replicas=3
- 139 kubectl get pods --selector app=nginx-taint
- 140 kubectl get pods --selector app=nginx-taint -o wide
- 141 vim taint-toleration.yaml
- 142 kubectl create -f taint-toleration.yaml
- 143 kubectl get pods -o wide | grep tolera
- 144 kubectl get pods -o wide
- 145 ./counter.sh 5
- 146 kubectl edit node worker1
- 147 history
Advertisement
Add Comment
Please, Sign In to add comment