Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- student@control:~/cka$ history
- 1 free -m
- 2 lscspu
- 3 lscpu
- 4 df -h
- 5 sudo apt install vim git -y
- 6 git clone https://github.com/sandervanvugt/cka
- 7 cd cka
- 8 ls
- 9 ./setup-container.sh
- 10 ./setup-kubetools.sh
- 11 sudo ./setup-kubetools.sh
- 12 history
- 13 sudo kubeadm init
- 14 mkdir -p $HOME/.kube
- 15 sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
- 16 sudo chown $(id -u):$(id -g) $HOME/.kube/config
- 17 kubectl get all
- 18 kubectl get pods -n kube-system
- 19 kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
- 20 kubectl get ns
- 21 kubectl get all -n kube-system
- 22 kubectl get nodes
- 23 history
- 24 kubectl get all -n kube-system
- 25 history
- 26 kubectl create deploy testdeploy --image=nginx --replicas=3
- 27 sleep 10; kubectl get pods -o wide
- 28 kubectl run task2pod --image=nginx -n mynamespace -- sleep 3600
- 29 kubectl create ns mynamespace
- 30 kubectl run task2pod --image=nginx -n mynamespace -- sleep 3600
- 31 kubectl delete pod task2pod
- 32 kubectl get pods
- 33 source <(kubectl completion bash)
- 34 kubectl delete pod task2pod -n mynamespace
- 35 kubectl run task2pod --image=alpine -n mynamespace -- sleep 3600
- 36 kubectl get pods -n mynamespace
- 37 kubectl get pods -n mynamespace -o yaml | less
- 38 history
- 39 kubectl run task3pod --image=nginx --image=redis --image=busybox
- 40 kubectl get pods
- 41 kubectl get pods task3pod -o yaml | less
- 42 kubectl describe pod task3pod
- 43 kubectl delete pod task3pod
- 44 history
- 45 kubectl run task3pod --image=busybox --dry-run=client -o yaml -- sleep infinity
- 46 kubectl run task3pod --image=busybox --dry-run=client -o yaml -- sleep infinity > task3.yaml
- 47 vim task3.yaml
- 48 kubectl apply -f task3.yaml
- 49 kubectl get pods
- 50 cat task3.yaml
- 51 history
- 52 cat task3.yaml
- 53 history
- 54 vim task4pod.yaml
- 55 vim md4.yaml
- 56 kubectl apply -f md4.yaml
- 57 kubectl get pods
- 58 vim md4.yaml
- 59 history
- 60 kubectl create quota --help | less
- 61 kubectl create ns limited
- 62 kubectl create quota qtest --hard pods=3,cpu=100m,memory=500Mi --namespace limited
- 63 kubectl get quota
- 64 kubectl get quota -n limited
- 65 kubectl describe ns limited
- 66 kubectl create deploy nginx --image=nginx --replicas=3 -n limited
- 67 kubectl get all -n limited
- 68 kubectl describe rs -n limited nginx-7854ff8877
- 69 kubectl set resources --help | less
- 70 kubectl set resources deploy nginx -n limited --requests cpu=100m,memory=5Mi --limits cpu=200m,memory=20Mi
- 71 history
- 72 kubectl get all -n limited
- 73 kubectl describe ns limited
- 74 kubectl edit -n limited quota
- 75 kubectl get all -n limited
- 76 kubectl scale -n limited deployment nginx --replicas=3
- 77 kubectl get all -n limited
- 78 kubectl scale -n limited deployment nginx --replicas=4
- 79 kubectl get all -n limited
- 80 kubectl scale -n limited deployment nginx --replicas=3
- 81 history
- 82 kubectl config view
- 83 history
- 84 less ~/.kube/config
- 85 kubectl config view
- 86 kubectl config --help
- 87 kubectl config current-context
- 88 kubectl config set-context --current --namespace=limited
- 89 kubectl config current-context
- 90 kubectl config view
- 91 kubectl config set-context --current --namespace=default
- 92 kubectl config view
- 93 history
- 94 kubectl create deploy nginxex5 --image=nginx --replicas=2
- 95 kubectl scale deployment nginxex5 --replicas=4
- 96 vim resize_pvc.yaml
- 97 history
- 98 vim nwpolicy-complete-example.yaml
- 99 kubectl apply -f nwpolicy-complete-example.yaml
- 100 kubectl expose pod nginx --port=80
- 101 kubectl exec -it busybox -- wget --spider --timeout=1 nginx
- 102 kubectl label pod busybox access=true
- 103 kubectl exec -it busybox -- wget --spider --timeout=1 nginx
- 104 kubectl create ns nwp-namespace
- 105 vim nwp-lab9-1.yaml
- 106 kubectl apply -f nwp-lab9-1.yaml
- 107 kubectl expose pod nwp-nginx --port=80
- 108 kubectl exec -it nwp-busybox -n nwp-namespace -- wget --spider --timeout=1 nwp-nginx
- 109 kubectl exec -it nwp-busybox -n nwp-namespace -- nslookup nwp-nginx
- 110 kubectl exec -it nwp-busybox -n nwp-namespace -- nslookup nwp-nginx.default.svc.cluster.local
- 111 kubectl exec -it nwp-busybox -n nwp-namespace -- wget --spider --timeout=1 nwp-nginx.default.svc.cluster.local
- 112 vim nwp-lab9-2.yaml
- 113 kubectl apply -f nwp-lab9-2.yaml
- 114 kubectl exec -it nwp-busybox -n nwp-namespace -- wget --spider --timeout=1 nwp-nginx.default.svc.cluster.local
- 115 kubectl create deploy busybox --image=busybox -- sleep 36000
- 116 kubectl exec -it busybox-6b56f788cb-qsgj2 -- wget --spider --timeout=1 nwp-nginx
- 117 kubectl delete -f nwp-lab9-2.yaml
- 118 history
- 119 vim selector-pod.yaml
- 120 kubectl apply -f selector-pod.yaml
- 121 kubectl get pods
- 122 vim selector-pod.yaml
- 123 kubectl apply -f selector-pod.yaml
- 124 kubectl get all
- 125 kubectl describe pod nginxxx
- 126 kubectl label nodes worker2 disktype=ssd
- 127 kubectl get pods
- 128 kubectl edit nodes control
- 129 kubectl get pods -n kube-system -o wide
- 130 kubectl -n kube-system get daemonsets.apps calico-node -o yaml | less
- 131 kubectl taint nodes worker1 example-key=value1:NoSchedule
- 132 kubectl describe nodes worker1 | less
- 133 kubectl create deploy nginx-taint --image=nginx --replicas=3
- 134 kubectl get pods -o wide
- 135 vim taint-toleration.yaml
- 136 kubectl apply -f taint-toleration.yaml
- 137 kubectl get pods
- 138 kubectl get pods -o wide
- 139 kubectl taint nodes worker1 example-key=value1:NoSchedule-
- 140 kubectl get pods -o wide
- 141 kubectl scale deployment nginx-taint --replicas=1
- 142 kubectl scale deployment nginx-taint --replicas=3
- 143 kubectl get pods -o wide
- 144 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement