Advertisement
sandervanvugt

CKAD dec22 day1

Dec 5th, 2022
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.14 KB | None | 0 0
  1. student@student-virtual-machine:~/ckad$ history
  2. 1 minikube start --vm-driver=docker --cni=calico
  3. 2 kubectl get all
  4. 3 minikube status
  5. 4 minikube ssh
  6. 5 minikube dashboard
  7. 6 bg
  8. 7 kubectl get all
  9. 8 source <(kubectl completion bash)
  10. 9 kubectl get all
  11. 10 kubectl create deployment firstginx --image=nginx --replicas=3
  12. 11 kubectl get all
  13. 12 history
  14. 13 kubectl completion -h | less
  15. 14 kubectl scale deployment --replicas=1
  16. 15 kubectl scale deployment firstginx --replicas 1
  17. 16 kubectl get all
  18. 17 kubectl scale deployment firstginx --replicas 3
  19. 18 history
  20. 19 kubectl get pods
  21. 20 kubectl get pods -o wide
  22. 21 history
  23. 22 kubectl -h | less
  24. 23 kubectl create -h | less
  25. 24 kubectl create deploy -h | less
  26. 25 ls
  27. 26 history
  28. 27 cd
  29. 28 git clone https://github.com/sandervanvugt/ckad
  30. 29 cd ckad
  31. 30 cd dockerfile/
  32. 31 ls
  33. 32 vim Dockerfile
  34. 33 docker build . -t centmap
  35. 34 docker images
  36. 35 docker save --help
  37. 36 cd ..
  38. 37 ./countdown 12
  39. 38 history
  40. 39 kubectl run -h | less
  41. 40 kubectl run hazelcast --image=hazelcast/hazelcast --env="DNS_DOMAIN=cluster" --env="POD_NAMESPACE=default"
  42. 41 kubectl get pods
  43. 42 kubectl get pods hazelcast -o json | less
  44. 43 kubectl get pods hazelcast -o yaml | less
  45. 44 kubectl describe pod hazelcast | less
  46. 45 kubectl get pods
  47. 46 kubectl delete pod firstginx-7c4fcf6b55-w6pd2
  48. 47 kubectl get pods
  49. 48 kubectl get all
  50. 49 kubectl delete pod hazelcast
  51. 50 kubectl get all
  52. 51 kubectl scale deployment firstginx --replicas 2
  53. 52 kubectl get all
  54. 53 kubectl delete replicasets.apps firstapp-568f648dc5
  55. 54 kubectl get all
  56. 55 kubectl delete deploy firstapp
  57. 56 kubectl get all
  58. 57 history
  59. 58 kubectl get deployments.apps -o yaml | less
  60. 59 kubectl get deployments.apps firstginx -o yaml | less
  61. 60 kubectl explain pod
  62. 61 kubectl explain pod.spec | less
  63. 62 kubectl explain pod.spec.volumes | less
  64. 63 kubectl run yournginx --image=nginx --dry-run=client -o yaml
  65. 64 kubectl run yournginx --image=nginx --dry-run=client -o yaml > yournginx.yaml
  66. 65 kubectl explain pod.spec
  67. 66 kubectl explain pod.spec | less
  68. 67 vim yournginx.yaml
  69. 68 kubectl create -f yournginx.yaml
  70. 69 kubectl apply -f yournginx.yaml
  71. 70 kubectl run -h | less
  72. 71 kubectl create -h | less
  73. 72 history
  74. 73 vim sidecar.yaml
  75. 74 kubectl create -f sidecar.yaml
  76. 75 kubectl get pods
  77. 76 kubectl describe pod sidecar-pod
  78. 77 kubectl exec -it sidecar-pod -c sidecar -- /bin/bash
  79. 78 ./countdown 12
  80. 79 cat sidecar.yaml
  81. 80 vim initone.yaml
  82. 81 kubectl apply -f initone.yaml
  83. 82 kubectl get pods
  84. 83 cat initone.yaml
  85. 84 kubectl get pods
  86. 85 kubectl describe pod initone
  87. 86 kubectl get pods
  88. 87 vim initone.yaml inittwo.yaml
  89. 88 vim inittwo.yaml
  90. 89 cp initone.yaml inittwo.yaml
  91. 90 vim inittwo.yaml
  92. 91 kubectl apply -f inittwo.yaml
  93. 92 kubectl get pods
  94. 93 kubectl delete pod initone
  95. 94 history
  96. 95 kubectl get all
  97. 96 kubectl get ns
  98. 97 kubectl create ns secret
  99. 98 kubectl get ns
  100. 99 kubectl run secretpod --image=nginx -n secret
  101. 100 kubectl get pods
  102. 101 kubectl get pods -n secret
  103. 102 kubectl get pods -A
  104. 103 kubectl config view
  105. 104 kubectl config set-context --current secret
  106. 105 kubectl config set --current secret
  107. 106 kubectl config --help
  108. 107 kubectl config set-context --current ns=secret
  109. 108 kubectl config set-context --current --ns=secret
  110. 109 kubectl config set-context --current --namespace=secret
  111. 110 kubectl config set-context -h | less
  112. 111 kubectl get pods
  113. 112 kubectl config set-context --current --namespace=default
  114. 113 kubectl get pods
  115. 114 history
  116. 115 kubectl explain pod
  117. 116 kubectl explain pod.spec
  118. 117 kubectl describe pod yournginx
  119. 118 kubectl get pods
  120. 119 kubectl exec -it firstginx-7c4fcf6b55-6r9zl -- sh
  121. 120 kubectl logs yournginx
  122. 121 kubectl describe pods yournginx | less
  123. 122 history
  124.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement