Advertisement
sandervanvugt

CKAD may22 day1

May 31st, 2022
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.36 KB | None | 0 0
  1. student@student-virtual-machine:~/ckad$ history
  2. 1 minikube start --vm-driver=docker
  3. 2 kubectl get all
  4. 3 free -m
  5. 4 df -h
  6. 5 lscpu
  7. 6 history
  8. 7 ls
  9. 8 minikube ssh
  10. 9 kubectl get all
  11. 10 minikube dashboard
  12. 11 kubectl get all
  13. 12 kubectl create deploy firstginx --image=nginx --replicas=3
  14. 13 kubectl create deploy cmdginx --image=nginx --replicas=3
  15. 14 kubectl get all
  16. 15 kubectl delete deploy cmdginx
  17. 16 kubectl get all
  18. 17 history
  19. 18 minikube --help | less
  20. 19 ./countdown 13
  21. 20 kubectl explain pod
  22. 21 kubectl explain pod.spec | less
  23. 22 kubectl explain pod.spec.container | less
  24. 23 kubectl explain pod.spec.containers | less
  25. 24 kubectl --help | less
  26. 25 kubectl completion --help | less
  27. 26 source <(kubectl completion bash)
  28. 27 kubectl completion --help | less
  29. 28 less ~/.kube/config
  30. 29 kubectl config view
  31. 30 kubectl get all
  32. 31 kubectl delete pod firstginx-58f758f4d9-9hnd4
  33. 32 kubectl get all
  34. 33 kubectl run --help | less
  35. 34 kubectl run hazelcast --image=hazelcast/hazelcast --env="DNS_DOMAIN=cluster" --env="POD_NAMESPACE=default"
  36. 35 kubectl get all
  37. 36 kubectl run --help
  38. 37 kubectl run --help | less
  39. 38 kubectl get all
  40. 39 kubectl delete pod hazelcast
  41. 40 kubectl get all
  42. 41 kubectl get pods
  43. 42 kubectl get pods firstginx-58f758f4d9-6zm4d -o yaml
  44. 43 kubectl describe pods firstginx-58f758f4d9-6zm4d
  45. 44 kubectl describe pods firstginx-58f758f4d9-6zm4d | less
  46. 45 history
  47. 46 kubectl get all
  48. 47 ./countdown 12
  49. 48 history
  50. 49 ls
  51. 50 vim mypod.yaml
  52. 51 sudo apt install vim
  53. 52 vim mypod.yaml
  54. 53 kubectl api-resources | less
  55. 54 vim mypod.yaml
  56. 55 kubectl api-resources | less
  57. 56 vim mypod.yaml
  58. 57 kubectl explain pod.spec | less
  59. 58 vim mypod.yaml
  60. 59 kubectl get pods firstginx-58f758f4d9-6zm4d -o yaml | less
  61. 60 kubectl run mynginx --image=nginx --dry-run=client -o yaml
  62. 61 kubectl run mynginx --image=nginx --dry-run=client -o yaml > mynginx.yaml
  63. 62 vim mynginx.yaml
  64. 63 kubectl create -f mynginx.yaml
  65. 64 kubectl get pods
  66. 65 kubectl delete -f mynginx.yaml
  67. 66 kubectl apply -f mynginx.yaml
  68. 67 kubectl get pods mynginx -o yaml
  69. 68 kubectl get pods mynginx -o yaml | less
  70. 69 vim mynginx.yaml
  71. 70 kubectl apply -f mynginx.yaml
  72. 71 kubectl get pods
  73. 72 vim sidecar.yaml
  74. 73 kubectl create -f sidecar.yaml
  75. 74 kubectl get pods
  76. 75 kubectl describe pod sidecar-pod | less
  77. 76 kubectl exec -it sidecar-pod -c sidecar -- /bin/bash
  78. 77 vim sidecar.yaml
  79. 78 ls
  80. 79 history
  81. 80 vim init-example1.yaml
  82. 81 kubectl create -f init-example1.yaml ; kubectl get pods
  83. 82 kubectl get pods
  84. 83 vim init-example2.yaml
  85. 84 kubectl create -f init-example2.yaml
  86. 85 kubectl get pods
  87. 86 cp init-example2.yaml multicontainer.yaml
  88. 87 vim multicontainer.yaml
  89. 88 ./countdown 12
  90. 89 history
  91. 90 kubectl exec -it sidecar-pod -c sidecar -- /bin/bash
  92. 91 kubectl exec -it sidecar-pod -c sidecar /bin/bash
  93. 92 kubectl get pods
  94. 93 kubectl get pods -A
  95. 94 kubectl get ns
  96. 95 kubectl get pods -A
  97. 96 kubectl get all -A
  98. 97 kubectl create ns secret
  99. 98 kubectl get ns
  100. 99 vim busybox-ns.yaml
  101. 100 kubectl create -f busybox-ns.yaml
  102. 101 kubectl get pods
  103. 102 vim busybox-ns.yaml
  104. 103 kubectl explain pod.metadata
  105. 104 kubectl create -f busybox-ns.yaml
  106. 105 kubectl get pods
  107. 106 kubectl get pods -A
  108. 107 kubectl get pods -n secret
  109. 108 kubectl run secretginx --image=nginx -n secret
  110. 109 kubectl run nginxlab --image=nginx
  111. 110 k
  112. 111 kubectl run mydb --image=mariadb
  113. 112 kubectl get pods
  114. 113 kubectl describe pod mydb | less
  115. 114 kubectl logs mydb
  116. 115 kubectl run mydb --image=mariadb --env MARIADB_ROOT_PASSWORD
  117. 116 kubectl run --help | less
  118. 117 kubectl run mydb --image=mariadb --env="MARIADB_ROOT_PASSWORD=password"
  119. 118 kubectl delete pod mydb
  120. 119 kubectl run mydb --image=mariadb --env="MARIADB_ROOT_PASSWORD=password"
  121. 120 kubectl get pods
  122. 121 history
  123. 122 kubectl get all
  124. 123 kubectl exec -it firstginx-58f758f4d9-6zm4d -- /bin/bash
  125. 124 kubectl exec -it busybox3 -- sh
  126. 125 kubectl describe pod nginxlab | less
  127. 126 history
  128.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement