Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- student@control:~/cka$ history
- 1 ip a
- 2 git clone https://github.com/sandervanvugt/cka
- 3 cd cka
- 4 ls *sh
- 5 less setup-container.sh
- 6 ./setup-container.sh
- 7 ls
- 8 ls *sh
- 9 vim setup-kubetools-specific-version.sh
- 10 sudo ./setup-kubetools-specific-version.sh
- 11 sudo kubeadm --help
- 12 sudo kubeadm init
- 13 mkdir -p $HOME/.kube
- 14 kubectl get all
- 15 kubectl get pods -n kube-system
- 16 ls
- 17 kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.25.0/manifests/calico.yaml
- 18 kubectl get pods -n kube-system
- 19 kubectl get nodes
- 20 kubectl create deploy testapp --image=nginx --replicas=3
- 21 kubectl get all
- 22 history
- 23 echo AFTER COMMAND 13: run : sudo cp /etc/kubernetes/admin.conf ~/.kube/config; sudo chown $USER:$USER ~/.kube/config
- 24 vim wz.yaml
- 25 kubectl create ns mynamespace
- 26 kubectl run task2pod --image=alpine -n mynamespace -- sleep 3600
- 27 source <(kubectl completion bash)
- 28 kubectl get pods -n mynamespace
- 29 kubectl get pods -n mynamespace -o yaml | less
- 30 history
- 31 vim rp.yaml
- 32 kubectl apply -f rp.yaml
- 33 kubectl get pods
- 34 kubectl describe pod task3pod
- 35 vim wzz.yaml
- 36 kubectl delete pod task3pod
- 37 kubectl apply -f wzz.yaml
- 38 kubectl get pods
- 39 kubectl explain pod.spec.containers.spec.args
- 40 kubectl apply -f wzz.yaml
- 41 vim wzz.yaml
- 42 kubectl explain pod.spec.containers.args
- 43 cat wzz.yaml
- 44 kubectl get quota
- 45 kubectl create ns limited
- 46 kubectl create quota qtest --hard pods=3,cpu=100m,memory=500Mi -n limited
- 47 kubectl create quota -n limited
- 48 kubectl describe quota -n limited
- 49 kubectl create deployt nginx --image=nginx --replicas=3 -n limited
- 50 kubectl create deploy nginx --image=nginx --replicas=3 -n limited
- 51 kubectl get all -n limited
- 52 kubectl describe replicaset.apps/nginx-76d6c9b8c
- 53 kubectl describe replicaset.apps/nginx-76d6c9b8c -n limited
- 54 kubectl set resources -n limited deploy nginx --request cpu=100m,memory=5Mi --limits cpu=200m,memory=20Mi -n limited
- 55 kubectl set resources -n limited deploy nginx --requests cpu=100m,memory=5Mi --limits cpu=200m,memory=20Mi -n limited
- 56 kubectl get all -n limited
- 57 kubectl describe quota -n limited
- 58 kubectl edit quota -n limited
- 59 kubectl get all -n limited
- 60 kubectl describe quota -n limited
- 61 kubectl get all -n limited
- 62 kubectl scale deploy -n limited nginx --replicas=3
- 63 kubectl scale deploy -n limited nginx --replicas=2
- 64 kubectl scale deploy -n limited nginx --replicas=3
- 65 kubectl get all -n limited
- 66 history
- 67 vim ts.yaml
- 68 cat ts.yaml
- 69 kubectl create ns restricted
- 70 kubectl create quota qrestricted --hard pods=3,memory=1000Mi -n restricted
- 71 kubectl describe quota qrestricted -n restricted
- 72 kubectl reate deploy task7deploy --image=nginx --replicas=3 -n restricted
- 73 kubectl create deploy task7deploy --image=nginx --replicas=3 -n restricted
- 74 kubectl get all -n restricted
- 75 kubectl set resources -n restricted deploy task7deploy
- 76 kubectl set resources -n restricted deploy task7deploy --requests cpu=100m,memory=5Mi --limits cpu=200m,memory=20Mi
- 77 kubectl get all -n restricted
- 78 history
- 79 kubectl get deploy -n restricted
- 80 kubectl get deploy -n restricted -o yaml
- 81 kubectl get nodes
- 82 kubectl label nodes worker2 disktype=ssd
- 83 vim selector-pod.yaml
- 84 kubectl label nodes worker2 disktype-
- 85 kubectl apply -f selector-pod.yaml
- 86 kubectl get pods
- 87 kubectl describe pod nginx
- 88 kubectl label nodes worker2 disktype=ssd
- 89 kubectl get pods
- 90 kubectl get nodes --show-labels
- 91 kubectl edit node control
- 92 kubectl get pods -n kube-system -o wide
- 93 kubectl get ds -n kube-system calico-node -o yaml | less
- 94 kubectl create deploy ttest --image=nginx --replicas=20
- 95 kubectl get pods -o wide
- 96 kubectl delete deployments.apps ttest
- 97 kubectl taint nodes worker1 example-key=value1:NoSchedule
- 98 kubectl describe node worker1
- 99 kubectl create deploy nginx-taint --image=nginx
- 100 kubectl scale deployment nginx-taint --replicas 3
- 101 kubectl get pods -o wide
- 102 vim taint-toleration.yaml
- 103 kubectl apply -f taint-toleration.yaml
- 104 kubectl get pods -o wide
- 105 kubectl apply -f taint-toleration.yaml
- 106 vim taint-toleration.yaml
- 107 kubectl delete -f taint-toleration
- 108 kubectl delete -f taint-toleration.yaml
- 109 kubectl apply -f taint-toleration.yaml
- 110 kubectl get pods -o wide
- 111 kubectl edit node worker1
- 112 history
- 113 vim tg.yaml
- 114 ./counter.sh 5
- 115 vim tss.yaml
- 116 kubectl apply -f tss.yaml
- 117 vim tss.yaml
- 118 kubectl apply -f tss.yaml
- 119 kubectl get pods
- 120 kubectl describe pod task4pod
- 121 vim tss.yaml
- 122 kubectl delete -f tss.yaml
- 123 kubectl apply -f tss.yaml
- 124 kubectl get pods
- 125 vim tss.yaml
- 126 touch --help
- 127 kubectl delete -f tss.yaml
- 128 vim tss.yaml
- 129 kubectl apply -f tss.yaml
- 130 kubectl get pods
- 131 vim tss.yaml
- 132 vim resize_pvc.yaml
- 133 kubectl apply -f resize_pvc.yaml
- 134 kubectl edit pvc -n myvol
- 135 kubectl explain --recursive persistentvolumeclaim
- 136 kubectl explain --recursive persistentvolumeclaim | less
- 137 kubectl explain --recursive storageclass | less
- 138 kubectl edit pvc -n myvol
- 139 ./counter.sh 11
- 140 kubectl get pods -n kube-system
- 141 kubectl get pods -n kube-system calico-node-zpb6d -o yaml
- 142 kubectl get pods -n roles --as=system:serviceaccount:roles:calico-node
- 143 kubectl get clusterroles
- 144 kubectl get clusterroles | grep calico
- 145 kubectl get clusterroles calico-node -o yaml
- 146 kubectl get clusterroles calico-node -o yaml | less
- 147 kubectl get clusterrolebindings
- 148 kubectl get clusterrolebindings | grep calico
- 149 kubectl describe clusterrolebindings.rbac.authorization.k8s.io calico-node
- 150 kubectl create sa --help | less
- 151 kubectl create sa sander
- 152 kubectl create role -h | less
- 153 kubectl create role sanderrole --verb=get --verb=list --verb=watch --resource=pods
- 154 kubectl describe role sanderrole
- 155 kubectl create rolebinding -h | less
- 156 kubectl create rolebinding sanderrolebinding --role=sanderrole --serviceaccount=default:sander
- 157 kubectl describe rolebindings.rbac.authorization.k8s.io sanderrolebinding
- 158 history
- 159 vim wzzz.yaml
- 160 ./counter.sh 0
- 161 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement