sandervanvugt

CKAD oct20 day1

Nov 2nd, 2020
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.96 KB | None | 0 0
  1. [student@localhost ckad]$ history
  2. 1 history
  3. 2 ls
  4. 3 sudo dnf install -y git bash-completion vim
  5. 4 git clone https://github.com/sandervanvugt/ckad
  6. 5 cd ckad
  7. 6 vim kube-setup.sh
  8. 7 minikube status
  9. 8 kubectl get all
  10. 9 minikube status
  11. 10 minikube --help | less
  12. 11 minikube ssh
  13. 12 kubectl get all
  14. 13 minikube dashboard
  15. 14 bg
  16. 15 kubectl get all
  17. 16 kubectl --help | less
  18. 17 sudo rpm -qa | grep bash-compl
  19. 18 kubectl completino -h
  20. 19 kubectl completion -h |less
  21. 20 source <(kubectl completion bash)
  22. 21 kubectl create deployment --image=nginx nginx2
  23. 22 kubectl get all
  24. 23 kubectl delete pod nginx2-5fc4444698-jl8v4
  25. 24 kubectl get pods
  26. 25 ls
  27. 26 ./countdown 12
  28. 27 vim kube-setup.sh
  29. 28 kubectl api-resources | less
  30. 29 kubectl api-versions | less
  31. 30 kubectl api-resources | grep pod
  32. 31 kubectl explain pods
  33. 32 ls
  34. 33 vim busybox.yaml
  35. 34 kubectl explain pod.spec
  36. 35 kubectl explain pod.spec | less
  37. 36 kubectl proxy --port=8001 &
  38. 37 curl http://localhost:8001/version
  39. 38 kubectl get pods
  40. 39 curl http://localhost:8001/api/v1/namespaces/default/pods
  41. 40 curl http://localhost:8001/api/v1/namespaces/default/pods | less
  42. 41 kubectl get pods
  43. 42 curl http://localhost:8001/api/v1/namespaces/default/pods/nginx2-5fc4444698-h8gll
  44. 43 kubectl get pods
  45. 44 curl -XDELETE http://localhost:8001/api/v1/namespaces/default/pods/nginx2-5fc4444698-h8gll
  46. 45 kubectl get pods
  47. 46 ./countdown 12
  48. 47 cd
  49. 48 cd .kube/
  50. 49 ls
  51. 50 vim config
  52. 51 kubectl config view
  53. 52 cd
  54. 53 kubectl run ghost --image=ghost:0.9
  55. 54 kubectl get pods
  56. 55 kubectl delete pod ghost
  57. 56 kubectl get pods
  58. 57 cd ckad/
  59. 58 vim busybox.yaml
  60. 59 kubectl apply -f busybox.yaml
  61. 60 kubectl get pods
  62. 61 kubectl get pods busybox2
  63. 62 kubectl get pods busybox2 -o yaml | less
  64. 63 cat busybox.yaml
  65. 64 kubectl describe pods busybox2 | less
  66. 65 kubectl edit pod busybox2
  67. 66 echo $EDITOR
  68. 67 echo "export EDITOR=/usr/bin/vim" >> ~/.bashrc
  69. 68 kubectl edit pod busybox2
  70. 69 export EDITOR=/usr/bin/vim
  71. 70 kubectl edit pod busybox2
  72. 71 kubectl get pods
  73. 72 kubectl get pods busybox2 -o yaml | less
  74. 73 history | grep run
  75. 74 kubectl run ghost --image=ghost:0.9
  76. 75 kubectl get pods ghost -o yaml | less
  77. 76 vim busybox.yaml
  78. 77 kubectl explain pod
  79. 78 kubectl explain pod.spec |less
  80. 79 kubectl explain pod.spec.containers |less
  81. 80 kubectl explain pod.spec.containers.image |less
  82. 81 kubectl explain --recursive pod.spec
  83. 82 kubectl explain --recursive pod.spec | less
  84. 83 ./countdown 12
  85. 84 echo hello
  86. 85 kubectl run nginx3 --image=nginx --dry-run=client -o yaml
  87. 86 kubectl run nginx3 --image=nginx --dry-run=client -o yaml > nginx3.yaml
  88. 87 kubectl get pods
  89. 88 kubectl create -f nginx3.yaml
  90. 89 kubectl get pods
  91. 90 kubectl run busypod --image=busybox --restart=Never --command -- /bin/sh
  92. 91 kubectl get pods busypod -o yaml > busypod.yaml
  93. 92 vim busypod.yaml
  94. 93 vim sleepy.yaml
  95. 94 kubectl create -f sleepy.yaml
  96. 95 kubectl get pods
  97. 96 kubectl logs sleepy
  98. 97 kubectl run mariadb --image=mariadb
  99. 98 kubectl get pods
  100. 99 kubectl logs mariadb
  101. 100 kubectl describe pod mariadb
  102. 101 kubectl logs mariadb
  103. 102 kubectl delete pod mariadb
  104. 103 kubectl run mariadb --image=mariadb -e MYSQL_ROOT_PASSWORD=password -e MYSQL_DATABASE=mydb
  105. 104 kubectl run -h | less
  106. 105 kubectl run mariadb --image=mariadb --env MYSQL_ROOT_PASSWORD=password --env MYSQL_DATABASE=mydb
  107. 106 kubectl get pods
  108. 107 history | grep busypod
  109. 108 vim sidecar.yaml
  110. 109 kubectl create -f sidecar.yaml
  111. 110 kubectl get pods
  112. 111 kubectl exec -it sidecar-pod /bin/bash
  113. 112 kubectl exec -it sidecar-pod -c sidecar -- /bin/bash
  114. 113 history
Add Comment
Please, Sign In to add comment