Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- student@control:~$ history
- 1 exit
- 2 free -m
- 3 lscpu | less
- 4 df -h
- 5 git clone https://github.com/sandervanvugt/kube3weeks
- 6 cd kube3weeks/
- 7 ./countdown 15
- 8 ls -l *sh
- 9 cd ..
- 10 cd kube3weeks/
- 11 git pull
- 12 history
- 13 vim setup-container.sh
- 14 ./setup-container.sh
- 15 sudo systemctl status containerd
- 16 history
- 17 ./setup-kubetools.sh
- 18 sudo ./setup-kubetools.sh
- 19 sudo kubeadm init
- 20 mkdir -p $HOME/.kube
- 21 kubectl get all
- 22 ls cal*
- 23 kubectl apply -f calico.yaml
- 24 history
- 25 sudo systemctl status containerd
- 26 free -m
- 27 history
- 28 kubectl get all
- 29 source <(kubectl completion bash)
- 30 kubectl create deploy myfirstapp --image=nginx --replicas=3
- 31 kubectl get all
- 32 history
- 33 kubectl get all
- 34 kubectl delete pod myfirstapp-ff8c4b4d4-fkg4h
- 35 kubectl get all
- 36 history
- 37 kubectl run lonelypod --image=nginx
- 38 kubectl get all
- 39 kubectl delete pod lonelypod
- 40 kubectl get all
- 41 history
- 42 sudo systemctl status containerd
- 43 sudo systemctl status kubelet
- 44 kubectl get pods -n kube-system
- 45 kubectl get all
- 46 kubectl config view
- 47 kubectl get nodes
- 48 kubectl edit nodes control
- 49 kubectl get all
- 50 history | grep create depl
- 51 history | grep 'create depl'
- 52 kubectl api-resources | less
- 53 kubectl explain pod.spec
- 54 kubectl explain pod.spec | less
- 55 history
- 56 kubectl run mynginx --image=nginx --dry-run=client -o yaml
- 57 kubectl run mynginx --image=nginx --dry-run=client -o yaml > mynginx.yaml
- 58 kubectl explain pods.spec
- 59 kubectl explain pods.spec.volumes
- 60 kubectl apply -f mynginx.yaml
- 61 kubectl create -f mynginx.yaml
- 62 kubectl get pods
- 63 kubectl delete -f mynginx.yaml
- 64 ./countdown 13
- 65 vim multicontainer.yaml
- 66 kubectl apply -f multicontainer.yaml
- 67 kubectl get pods
- 68 vim initcontainer.yaml
- 69 kubectl create -f initcontainer.yaml
- 70 kubectl get pods
- 71 kubectl get ns
- 72 kubectl get pods
- 73 kubectl get pods -n kube-system
- 74 kubectl create ns myns
- 75 kubectl get ns
- 76 kubectl run mypod --image=nginx -n myns
- 77 kubectl get pods
- 78 kubectl get pods -n myns
- 79 kubectl get pods -A
- 80 history
- 81 kubectl config set-context --current namespace=myns
- 82 kubectl config set-context --current --namespace=myns
- 83 kubectl get pods
- 84 kubectl config set-context --current --namespace=default
- 85 kubectl get pdos
- 86 kubectl get pods
- 87 kubectl config view
- 88 history
- 89 kubectl run mydb --image=mariadb
- 90 kubectl get pods
- 91 kubectl describe pods mydb
- 92 kubectl get pods
- 93 kubectl describe pod mydb | less
- 94 history
- 95 kubectl logs mydb
- 96 kubectl delete pod mydb
- 97 kubectl run -h | less
- 98 kubectl run dbsdb --image=mariadb --env MARIADB_ROOT_PASSWORD=password
- 99 kubectl get pods
- 100 ls
- 101 cd ..
- 102 cd kube3weeks/
- 103 git pull
- 104 vim frontend-resources.yaml
- 105 kubectl apply -f frontend-resources.yaml
- 106 kubectl get pods
- 107 kubectl describe pod frontend
- 108 vim frontend-resources.yaml
- 109 kubectl delete pod frontend
- 110 kubectl apply -f frontend-resources.yaml
- 111 kubectl get pods
- 112 kubectl describe pod frontend
- 113 kubectl delete pod frontend
- 114 kubectl run busy --image=busybox
- 115 kubectl get pods
- 116 kubectl describe pod busy | less
- 117 kubectl logs busy
- 118 history
- 119 kubectl get pods -o wide
- 120 history
- 121 sudo poweroff
- 122 cd kube3weeks/
- 123 ./countdown 15
- 124 ls
- 125 cd kube3weeks/
- 126 ./countdown 13
- 127 kubectl get all
- 128 source <(kubectl completion bash)
- 129 kubectl get deploy
- 130 kubectl delete deploy myfirstapp
- 131 kubectl create deploy mynginx --image=nginx --replicas=3
- 132 kubectl get all
- 133 kubectl delete pod mynginx-56766fcf49-88vjj
- 134 kubectl get all
- 135 kubectl scale deploy mynginx --replicas=4
- 136 kubectl get all
- 137 kubectl scale deploy mynginx --replicas=0
- 138 history
- 139 kubectl get all
- 140 kubectl edit deploy mynginx
- 141 kubectl create deploy oldnginx --image=nginx:1.14 --replicas=3
- 142 kubectl get all --selector app=oldnginx
- 143 kubectl set image deploy oldnginx nginx=nginx:latest
- 144 kubectl get all --selector app=oldnginx
- 145 kubectl rollout status
- 146 kubectl rollout status deployment oldnginx
- 147 kubectl rollout history deployment oldnginx
- 148 kubectl get all --selector app=oldnginx -o wide
- 149 kubectl edit deployments.apps oldnginx
- 150 kubectl get deploy oldnginx -o yaml
- 151 kubectl create deploy lnginx --image=nginx --replicas=3
- 152 kubectl get all --show-labels
- 153 kubectl get all --selector app=lnginx
- 154 kubectl label pod lnginx-54d4579875-2jwjt app-
- 155 kubectl get all
- 156 kubectl delete pod lnginx-54d4579875-2jwjt
- 157 kubectl get all
- 158 history
- 159 kubectl get deploy
- 160 kubectl delete deploy lnginx mynginx oldnginx
- 161 kubectl create deploy daemondemo --image=nginx --dry-run=client -o yaml > daemondemo.yaml
- 162 vim daemondemo.yaml
- 163 kubectl apply -f daemondemo.yaml
- 164 kubectl get daemonset
- 165 kubectl get all --selector app=daemondemo
- 166 kubectl get all --selector app=daemondemo -o wide
- 167 history
- 168 vim daemondemo.yaml
- 169 kubectl edit nodes control
- 170 kubectl create deploy nginxsvc --image=nginx
- 171 kubectl scale deploy nginxsvc --replicas 3
- 172 kubectl get all --selector app=nginxsvc
- 173 kubectl expose deploy nginxsvc --port=80
- 174 kubectl get all --selector app=nginxsvc
- 175 kubectl describe svc nginxsvc
- 176 kubectl get svc
- 177 kubectl get enpoints
- 178 kubectl get endpoints
- 179 curl 10.109.60.162
- 180 kubectl edit svc nginxsvc
- 181 kubectl get svc
- 182 ip a
- 183 history
- 184 kubectl edit svc nginxsvc
- 185 kubectl get svc
- 186 kubectl edit svc nginxsvc
- 187 kubectl get svc
- 188 kubectl edit svc nginxsvc
- 189 kubectl get svc
- 190 kubectl edit svc nginxsvc
- 191 kubectl get svc
- 192 kubectl edit svc nginxsvc
- 193 cat daemondemo.yaml
- 194 kubectl get svc
- 195 kubectl run testpod --image=busybox -- sh
- 196 kubectl exec -it testpod -- sh
- 197 kubectl delete pod testpod
- 198 kubectl run -it testpod --image=busybox -- sh
- 199 kubectl run -it testpod --image=sandervanvugt/gittools -- sh
- 200 kubectl run -it testpod2 --image=sandervanvugt/gittools -- sh
- 201 reset
- 202 kubectl get pods
- 203 kubectl delete pod testpod
- 204 kubectl delete pod testpod2
- 205 kubectl run -it testpod --image=busybox -- sh
- 206 kubectl get svc
- 207 kubectl get svc -A
- 208 history
- 209 ls
- 210 tar xvf helm-v3.11.2-linux-amd64.tar.gz
- 211 ls -l linux-amd64/helm
- 212 sudo cp linux-amd64/helm /usr/local/bin
- 213 helm version
- 214 helm upgrade --install ingress-nginx ingress-nginx --repo https://kubernetes.github.io/ingress-nginx --namespace ingress-nginx --create-namespace
- 215 kubectl get all -n ingress-nginx
- 216 kubectl get all --selector app=nginxsvc
- 217 kubectl create ingress nginxsvc --class=nginx --rule=nginxsvc.info/*=nginxsvc:80
- 218 kubectl port-forward -n ingress-nginx svc/ingress-nginx-controller 8080:80
- 219 bg
- 220 history
- 221 sudo vim /etc/hosts
- 222 curl nginxsvc.info:8080
- 223 history
- 224 kubectl get ing,svc,pods --selector app=nginxsvc
- 225 kubectl get ing,svc,pods
- 226 kubectl describe ing nginxsvc
- 227 history
- 228 helm version
- 229 kubectl explain pods.spec.volumes | less
- 230 cd kube3weeks/
- 231 ls
- 232 vim morevolumes.yaml
- 233 kubectl apply -f morevolumes.yaml
- 234 kubectl get pods
- 235 kubectl get pods -o wide
- 236 kubectl describe pod morevol2
- 237 kubectl exec -it morevol2 -c centos1 -- touch /centos1/testfile
- 238 kubectl exec -it morevol2 -c centos2 -- ls /centos2
- 239 history
- 240 vim pv.yaml
- 241 kubectl apply -f pv.yaml
- 242 kubectl get pv
- 243 vim pvc.yaml
- 244 kubectl apply -f pvc.yaml
- 245 kubectl get pvc,pv
- 246 kubectl describe pv
- 247 vim pv-pod.yaml
- 248 kubectl apply -f pv-pod.yaml
- 249 kubectl get pods
- 250 kubectl exec -it pv-pod -- touch /usr/share/nginx/html/hello.txt
- 251 kubectl get pods -o wide
- 252 ssh student@192.168.29.41
- 253 ls
- 254 vim pv-pvc-pod.yaml
- 255 history
- 256 kubectl get pods -o wide
- 257 kubectl describe pod pv-pod
- 258 kubectl get pvc,pv
- 259 kubectl describe pv pv-volume
- 260 kubectl get pods -o wide
- 261 ssh 192.168.29.41
- 262 sudo apt install nfs-server -y
- 263 sudo mkdir /nfsexport
- 264 sudo vim /etc/exports
- 265 sudo systemctl restart nfs-server
- 266 showmount -e localhost
- 267 sudo vim /etc/hosts
- 268 helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/
- 269 helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner --set nfs.server=192.168.29.40 --set nfs.path=/nfsexport
- 270 kubectl get all
- 271 kubectl get pods -n kube-system
- 272 kubectl get pv
- 273 vim nfs-provisioner-pvc-test.yaml
- 274 kubectl get storageclass
- 275 kubectl describe storageclass nfs-client
- 276 kubectl edit storageclasses.storage.k8s.io nfs-client
- 277 kubectl apply -f nfs-provisioner-pvc-test.yaml
- 278 kubectl get pvc,pv
- 279 vim nfs-provisioner-pvc-test.yaml
- 280 kubectl apply -f nfs-provisioner-pvc-test.yaml
- 281 kubectl get pvc,pv
- 282 ls /nfsexport/
- 283 history
- 284 ./countdown 1
- 285 cat /etc/exports
- 286 history
- 287 tail -n /etc/exports
- 288 tail -1 /etc/exports
- 289 cat /etc/hosts
- 290 helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
- 291 helm install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard
- 292 kubectl get all
- 293 kubectl edit deploy kubernetes-dashboard
- 294 kubectl get all
- 295 kubectl get pods
- 296 kubectl get svc
- 297 kubectl edit svc kubernetes-dashboard
- 298 kubectl get svc
- 299 echo RBAC PROBLEM ON DASHBOARDkubectl get svc!
- 300 history
- 301 sudo poweroff
- 302 kubectl get all
- 303 history
- 304 cd kube3weeks/
- 305 vim varsfile
- 306 kubectl create cm mydbvars --from-env-file=varsfile
- 307 source <(kubectl completion bash)
- 308 kubectl describe cm mydbvars
- 309 kubectl get cm mydbvars -o yaml
- 310 kubectl create deploy mydb --image=mariadb --replicas=3
- 311 kubectl get all --selector app=mydb
- 312 kubectl set env deploy mydb --from=configmap/mydbvars
- 313 kubectl get all --selector app=mydb
- 314 kubectl get deployments.apps mydb -o yaml | less
- 315 history
- 316 echo hello > index.html
- 317 kubectl create cm myindex --from-file=index.html
- 318 kubectl describe cm myindex
- 319 kubectl create deploy myweb --image=nginx
- 320 kubectl edit deploy myweb
- 321 kubectl exec -it myweb-589445db67-wj5tp -- cat /usr/share/nginx/html/index.html
- 322 kubectl get pods -o wide
- 323 history
- 324 kubectl create secret generic -h | less
- 325 kubectl create secret generic dbsecret --from-literal=MYPASSWORD=password
- 326 kubectl describe secrets dbsecret
- 327 kubectl get secrets dbsecret -o yaml
- 328 echo cGFzc3dvcmQ= | base64 -d
- 329 kubectl set env deploy mydb --from=secret/dbsecret
- 330 kubectl get deploy mydb -o yaml | less
- 331 kubectl exec -it mydb-568db98b4d-zm6nb -- env
- 332 history
- 333 kubectl create secret docker-registry mycreds --docker-username=unclebob --docker-password=secretpw --docker-email=uncle@bob.org --docker-server=myregistry:5000
- 334 kubectl explain pod.spec.containers | less
- 335 kubectl explain pod.spec | less
- 336 history
- 337 kubectl edit deploy kubernetes-dashboard
- 338 kubectl edit svc kubernetes-dashboard
- 339 ./countdown 13
- 340 kubectl get ns
- 341 kubectl get pods
- 342 kubectl edit deployments.apps kubernetes-dashboard
- 343 kubectl get sa
- 344 history
- 345 kubectl get sa kubernetes-dashboard -o yaml
- 346 kubectl api-resources | less
- 347 kubectl get clusterrolebindings.rbac.authorization.k8s.io
- 348 kubectl get clusterrolebindings.rbac.authorization.k8s.io | wc
- 349 kubectl get clusterrolebindings.rbac.authorization.k8s.io | grep dash
- 350 kubectl describe clusterrolebindings.rbac.authorization.k8s.io kubernetes-dashboard-metrics
- 351 kubectl describe clusterrole kubernetes-dashboard-metrics
- 352 history
- 353 kubectl get clusterroles | less
- 354 kubectl describe clusterrole cluster-admin
- 355 kubectl describe clusterrole admin
- 356 history
- 357 kubectl create clusterrolebinding -h | less
- 358 kubectl create clusterrolebinding kubernetes-dashboard-cluster-admin --clusterrole=cluster-admin --serviceaccount=kubernetes-dashboard
- 359 kubectl create clusterrolebinding kubernetes-dashboard-cluster-admin --clusterrole=cluster-admin --serviceaccount=default:kubernetes-dashboard
- 360 kubectl describe clusterrolebindings.rbac.authorization.k8s.io kubernetes-dashboard-cluster-admin
- 361 kubectl get pods
- 362 kubectl delete pod kubernetes-dashboard-55f488db5d-vmzxp
- 363 kubectl get pods
- 364 history
- 365 kubectl get service
- 366 vim statefulset.yaml
- 367 kubectl get storageclass
- 368 kubectl get pvc,pv
- 369 vim statefulset.yaml
- 370 kubectl apply -f statefulset.yaml
- 371 kubectl get statefulsets.apps,pv,pvc,svc
- 372 kubectl get pods
- 373 vim statefulset.yaml
- 374 helm install bitnami/mysql --generate-name
- 375 helm repo add bitnami/bitnami
- 376 helm repo add bitnami https://charts.bitnami.com/bitnami
- 377 helm install bitnami/mysql --generate-name
- 378 kubectl get all | less
- 379 kubectl describe pods mysql-1679666722-0
- 380 kubectl get pvc
- 381 kubectl describe pvc data-mysql-1679666722-0
- 382 kubectl get pvc www-web-0 | less
- 383 kubectl get pvc www-web-0 -o yaml | less
- 384 kubectl edit pvc data-mysql-1679666722-0
- 385 kubectl get pvc
- 386 kubectl get pods
- 387 ./countdown 13
- 388 vim statefulset.yaml
- 389 kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/lastest/download/components.yaml
- 390 minikube addons list
- 391 kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
- 392 kubectl get pods -n kube-system
- 393 kubectl edit deployments.apps -n kube-system metrics-server
- 394 kubectl get pods -n kube-system
- 395 kubectl logs -n kube-system metrics-server-6c74f597cf-c5dgd
- 396 kubectl get pods -n kube-system
- 397 kubectl top pods
- 398 kubectl top nodes
- 399 history
- 400 ls
- 401 cd ..
- 402 cd kube3weeks/
- 403 git pull
- 404 kubectl edit deployments.apps -n kube-system metrics-server
- 405 cd autoscaling/
- 406 ls
- 407 vim Dockerfile
- 408 vim index.php
- 409 sudo apt install docker.io
- 410 sudo docker build -t php-apache .
- 411 crictl ps
- 412 sudo crictl ps
- 413 vim hpa.yaml
- 414 kubectl apply -f hpa.yaml
- 415 kubectl get deploy hpa
- 416 kubectl get deploy php-apache
- 417 kubectl autoscale -h | less
- 418 kubectl get deploy php-apache
- 419 kubectl top pods
- 420 kubectl autoscale deployment php-apache --cpu-percent=1 --min=3 --max=10
- 421 kubectl get hpa
- 422 kubectl top pods
- 423 kubectl run -it load-generator --rm --image=busybox --restart=Never -- /bin/sh -c "while sleep 0.01; do wget -q -O - http://php-apache; done"
- 424 kubectl get hpa
- 425 vim hpa.yaml
- 426 history
- 427 kubectl get hpa
- 428 kubectl top pods
- 429 kubectl get hpa
- 430 kubectl get deployments.apps php-apache
- 431 kubectl api-resources | less
- 432 cd ..
- 433 vim crd-object.yaml
- 434 kubectl apply -f crd-object.yaml
- 435 kubectl api-resources | grep back
- 436 cat crd-backup.yaml
- 437 kubectl create -f crd-backup.yaml
- 438 kubectl get backups.stable.example.com
- 439 kubectl get backups.stable.example.com -o yaml
- 440 ./countdown 13
- 441 kubectl get backups.stable.example.com -o yaml
- 442 cd ..
- 443 git clone https://github.com/sandervanvugt/kcna
- 444 cd kcna/
- 445 ls
- 446 cd kubernetes-prometheus/
- 447 ls
- 448 kubectl apply -f .
- 449 kubectl create ns monitoring
- 450 kubectl apply -f .
- 451 kubectl get all -n monitoring
- 452 kubectl delete -f .
- 453 cd
- 454 git clone https://github.com/prometeheus-operator/kube-prometheus
- 455 git clone https://github.com/prometheus-operator/kube-prometheus
- 456 cd kube
- 457 cd kube-prometheus/
- 458 kubectl create -f manifests/setup/
- 459 kubectl create -f manifests/
- 460 kubectl get pods -n monitoring
- 461 kubectl top pods
- 462 kubectl top pods -n monitor
- 463 kubectl top pods -n monitoring
- 464 kubectl top nodes
- 465 kubectl get svc -n monitoring
- 466 kubectl -n monitoring port-forward svc/prometheus-k8s 9090
- 467 bg
- 468 kubectl -n monitoring port-forward svc/grafana 3000 &
- 469 kubectl get pods -n monitoring
- 470 kubectl edit -n monitoring prometheus-k8s
- 471 kubectl edit -n monitoring svc prometheus-k8s
- 472 kubectl get svc -n monitoring
- 473 cd
- 474 history
Add Comment
Please, Sign In to add comment