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 git clone https://github.com/sandervanvugt/cka
- 3 cd cka
- 4 ls
- 5 sudo ./setup-container.sh
- 6 ls
- 7 sudo ./setup-kubetools-specific-version.sh
- 8 history
- 9 sudo kubeadm init
- 10 mkdir -p $HOME/.kube
- 11 kubectl get all
- 12 kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
- 13 history
- 14 kubectl get nodes
- 15 kubectl create deploy testginx --image=nginx --replicas=3
- 16 source <(kubectl completion bash)
- 17 kubectl get all
- 18 ./counter.sh 20
- 19 history
- 20 sudo kubeadm token create --print-join-command
- 21 sudo kubeadm --help | less
- 22 kubectl create ns mynamespace
- 23 kubectl run alpine --image alpine --command sleep 3600 --restart Always -n mynamespace
- 24 kubectl run -h | less
- 25 kubectl get pods
- 26 kubectl get pods -n mynamespace
- 27 kubectl get pods -n mynamespace -o yaml | less
- 28 history
- 29 ls
- 30 history
- 31 vim ah.yaml
- 32 kubectl apply -f ah.yaml
- 33 kubectl get pods
- 34 vim ah.yaml
- 35 history
- 36 vim lab4.yaml
- 37 kubectl apply -f lab4.yaml
- 38 kubectl get pods
- 39 cat lab4.yaml
- 40 kubectl create ns limited
- 41 kubectl create quota -h | less
- 42 kubectl create quota qtest --hard pods=3,cpu=100m,memory=500Mi -n limited
- 43 kubectl describe ns limited
- 44 kubectl describe quota -n limited
- 45 kubectl create deploy nginx --image=nginx --replicas=3 -n limited
- 46 kubectl get all -n limited
- 47 kubectl describe -n limited replicasets.apps nginx-8f458dc5b
- 48 kubectl set resources -h | less
- 49 kubectl set resources -n limited deploy nginx --requests cpu=100m,memory=5Mi --limits cpu=200m,memory=20Mi
- 50 kubectl get all -n limited
- 51 kubectl describe ns limited
- 52 kubectl edit quota -n limited
- 53 kubectl describe ns limited
- 54 kubectl scale deploy -n limited nginx --replicas=4
- 55 kubectl scale deploy -n limited nginx --replicas=3
- 56 kubectl describe ns limited
- 57 kubectl set resources -n limited deploy nginx --requests cpu=100m,memory=5Gi --limits cpu=200m,memory=20Gi
- 58 kubectl get all -n limited
- 59 kubectl scale deploy -n limited nginx --replicas=0
- 60 kubectl scale deploy -n limited nginx --replicas=3
- 61 kubectl get all -n limited
- 62 kubectl describe -n limited rs nginx-5bc7db48df
- 63 history
- 64 ./counter.sh 10
- 65 history
- 66 kubectl create deploy nginx-ex5 --image=nginx --replicas=2
- 67 kubectl get all --selector app=nginx-ex5
- 68 kubectl scale deployment nginx-ex5 --replicas=4
- 69 kubectl get all --selector app=nginx-ex5
- 70 history
- 71 kubectl create deploy lab9 --image=nginx:1.14 --replicas=4 --dry-run=client -o yaml > lab9.yaml
- 72 vim lab9.yaml
- 73 kubectl explain deploy.spec.strategy
- 74 kubectl explain --recursive deploy.spec.strategy
- 75 kubectl explain deploy.spec.strategy
- 76 vim lab9.yaml
- 77 kubectl apply -f lab9.yaml
- 78 kubectl explain deployment.spec
- 79 kubectl explain deployment.spec.strategy
- 80 kubectl apply -f lab9.yaml
- 81 vim lab9.yaml
- 82 kubectl apply -f lab9.yaml
- 83 kubectl set image deploy lab9 nginx=nginx:latest
- 84 kubectl rollout history deploy lab9
- 85 kubectl rollout undo deploy lab9
- 86 history
- 87 vim nwpolicy-complete-example.yaml
- 88 kubectl apply -f nwpolicy-complete-example.yaml
- 89 kubectl expose pod nginx --port=80
- 90 kubectl exec -it busybox -- wget --spider --timeout=1 nginx
- 91 kubectl label pod busybox access=true
- 92 kubectl exec -it busybox -- wget --spider --timeout=1 nginx
- 93 kubectl create ns nwp-namespace
- 94 vim nwp-lab9-1.yaml
- 95 kubectl create -f nwp-lab9-1.yaml
- 96 kubectl expose pod nwp-nginx --port=80
- 97 kubectl exec -it nwp-busybox -n nwp-namespace -- wget --spider --timeout=1 nwp-nginx
- 98 kubectl exec -it nwp-busybox -n nwp-namespace -- nslookup nwp-nginx
- 99 kubectl exec -it nwp-busybox -n nwp-namespace -- nslookup nwp-nginx.default.svc.cluster.local
- 100 kubectl exec -it nwp-busybox -n nwp-namespace -- wget --spider --timeout=1 nwp-nginx.default.svc.cluster.local
- 101 vim nwp-lab9-2.yaml
- 102 kubectl create -f nwp-lab9-2.yaml
- 103 kubectl exec -it nwp-busybox -n nwp-namespace -- wget --spider --timeout=1 nwp-nginx.default.svc.cluster.local
- 104 kubectl create deployment busybox --image=busybox -- sleep 3600
- 105 kubectl exec -it busybox-6588d4995c-hwqxl -- wget --spider --timeout=1 nwp-nginx
- 106 history
- 107 vim lab9.yaml
- 108 vim lab9ah.yaml
- 109 vim lab9-ab.yaml
- 110 kubectl get ns default -o yaml
- 111 vim lab9.yaml
- 112 ls lab*
- 113 cat lesson9lab.yaml
- 114 kubectl get nodes
- 115 kubectl drain -h | less
- 116 kubectl get pods -o wide
- 117 kubectl drain worker2
- 118 kubectl drain worker2 --ignore-daemonsets --force
- 119 kubectl get pods -o wide
- 120 #kubectl drain worker2
- 121 kubectl get nodes
- 122 kubectl describe node worker2 | less
- 123 kubectl uncordon node worker2
- 124 kubectl uncordon worker2
- 125 kubectl get nodes
- 126 history
- 127 kubectl get nodes
- 128 kubectl get pods -o wide
- 129 kubectl create deploy manyginx --image=nginx --replicas=8
- 130 kubectl get pods -o wide
- 131 sudo ls -l /etc/kubernetes/manifests
- 132 sudo less /etc/kubernetes/manifests/etcd.yaml
- 133 kubectl run myweb --image=nginx --dry-run=client -o yaml
- 134 kubectl get pods -o wide
- 135 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement