Advertisement
sandervanvugt

Untitled

May 17th, 2021
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.07 KB | None | 0 0
  1. 21 source <(kubectl completion bash)
  2. 22 kubectl create deployment --image=nginx mynginx --replicas=3
  3. 23 kubectl get all
  4. 24 kubectl describe pod mynginx-5b686ccd46-vqkxm
  5. 25 kubectl get nodes -o wide
  6. 26 kubectl describe nodes classroom-vm.vm.linuxfriendly.nl
  7. 27 kubectl taint nodes --all node-role.kubernetes.io/master-
  8. 28 kubectl get all
  9. 29 history
  10. 30 exit
  11. 31 history
  12. 32 kubectl proxy --port=8001 &
  13. 33 curl http://localhost:8001/version
  14. 34 curl http://localhost:8001/api/
  15. 35 curl http://localhost:8001/api/v1/
  16. 36 curl http://localhost:8001/api/v1/namespaces/default/pods
  17. 37 kubectl get pods
  18. 38 curl http://localhost:8001/api/v1/namespaces/default/pods/mynginx-5b686ccd46-vqkxm
  19. 39 curl -XDELETE http://localhost:8001/api/v1/namespaces/default/pods/mynginx-5b686ccd46-vqkxm
  20. 40 kubectl get pods
  21. 41 kubectl get all
  22. 42 history
  23. 43 cd .kube/
  24. 44 ls
  25. 45 cat config
  26. 46 cd
  27. 47 kubectl get pods -A
  28. 48 kubectl config -h | less
  29. 49 kubectl config view
  30. 50 kubectl get pods
  31. 51 history
  32. 52 kubectl get pods
  33. 53 kubectl get pods -A
  34. 54 kubectl get pods
  35. 55 kubectl run -h | less
  36. 56 mynginx-5b686ccd46-vqkxm
  37. 57 kubectl run nginx --image=nginx
  38. 58 kubectl get all
  39. 59 kubectl delete pod mynginx-5b686ccd46-qfbg9
  40. 60 kubectl get all
  41. 61 kubectl delete pod nginx
  42. 62 kubectl get all
  43. 63 cd ckad
  44. 64 ls
  45. 65 git clone https://github.com/sandervanvugt/ckad
  46. 66 cd ckad
  47. 67 ls
  48. 68 vim busybox.yaml
  49. 69 kubectl api-resources | grep pod
  50. 70 vim busybox.yaml
  51. 71 kubectl create -f busybox.yaml
  52. 72 kubectl get pdos
  53. 73 kubectl get pods
  54. 74 kubectl run busybox --image=busybox
  55. 75 kubectl get pods
  56. 76 kubectl explain pods.spec | less
  57. 77 kubectl get pods
  58. 78 source <(kubectl completion bash)
  59. 79 kubectl describe pod busybox
  60. 80 kubectl run mydb --image=mariadb
  61. 81 kubectl get pods
  62. 82 echo "source <(kubectl completion bash)" >> .bashrc
  63. 83 kubectl get pods
  64. 84 kubectl describe mydb
  65. 85 kubectl describe pods mydb
  66. 86 kubectl logs mydb
  67. 87 kubectl edit pods mydb
  68. 88 kubectl get pods mydb
  69. 89 kubectl get pods mydb -o yaml | less
  70. 90 kubectl api-resources | less
  71. 91 kubectl get pods mydb -o json | less
  72. 92 kubectl explain pod.spec | less
  73. 93 kubectl explain --recursive pod.spec | less
  74. 94 history
  75. 95 kubectl run -h | less
  76. 96 kubectl run hazelcast --image=hazelcast/hazelcast --port=5701 --dry-run=client -o yaml
  77. 97 kubectl run hazelcast --image=hazelcast/hazelcast --port=5701 --dry-run=client -o yaml > myhazel.yaml
  78. 98 vim myhazel.yaml
  79. 99 kubectl get pods
  80. 100 kubectl get pods busybox2 -o yaml | less
  81. 101 history
  82. 102 vim ex1b.txt
  83. 103 history
  84. [centos@classroom-vm ckad]$ cat ex1b.txt
  85. 1. run a pod that starts mysql image with all that is necessary to start it successfully.
  86. 2. after making sure that it runs, create a yaml file so that the next time you can run it from the yaml file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement