sandervanvugt

Untitled

Jun 9th, 2020
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.13 KB | None | 0 0
  1. 2 git clone https://github.com/sandervanvugt/kub4h
  2. 3 cat kub4h/kube-setup.sh
  3. 4 minikube start --memory 4096 --vm-driver=kvm2
  4. 5 minikube status
  5. 6 kubectl get all
  6. 7 sudo -i
  7. 8 history
  8. 9 cd kub4h/
  9. 10 ls
  10. 11 vim kube-setup.sh
  11. 12 history
  12. 13 id
  13. 14 minikube status
  14. 15 free -m
  15. 16 minikube ssh
  16. 17 kubectl get all
  17. 18 kubectl get all --all-namespaces
  18. 19 minikube dashboard
  19. 20 bg
  20. 21 history
  21. 22 kubectl get all
  22. 23 kubectl delete pod/firstnginx-7bf974b77f-jfljv
  23. 24 kubectl get all
  24. 25 ls
  25. 26 ./countdown 12
  26. 27 kubectl --help
  27. 28 kubectl --help | less
  28. 29 kubectl completion -h | less
  29. 30 source <(kubectl completion bash)
  30. 31 sudo rpm -qa | grep bash-c
  31. 32 kubectl api-resources | less
  32. 33 kubectl explain pods
  33. 34 kubectl explain pods.spec | less
  34. 35 kubectl explain pods.spec.containers
  35. 36 kubectl create -h |less
  36. 37 kubectl create deployment -h | less
  37. 38 kubectl create deployment my-dep --image=busybox
  38. 39 kubectl get all
  39. 40 kubectl describe pod my-dep-6f9f87db6f-px6gh
  40. 41 kubectl explain pods.spec
  41. 42 kubectl get all
  42. 43 history
  43. 44 kubectl proxy --port=8001 &
  44. 45 curl http://localhost:8001/version
  45. 46 curl http://localhost:8001/api/v1/namespaces/default/pods | less
  46. 47 curl http://localhost:8001/api/v1/namespaces/default/pods/firstnginx-7bf974b77f-nx5wl
  47. 48 curl -XDELETE http://localhost:8001/api/v1/namespaces/default/pods/firstnginx-7bf974b77f-nx5wl
  48. 49 kubectl get pods
  49. 50 kubectl get services
  50. 51 kubectl describe services firstnginx
  51. 52 kubectl run ghost --image=ghost:0.9
  52. 53 kubectl get all
  53. 54 ./countdown 12
  54. 55 ls
  55. 56 vim busybox.yaml
  56. 57 kubectl create -f busybox.yaml
  57. 58 kubectl get pods
  58. 59 kubectl get pods busybox2 -o yaml | less
  59. 60 kubectl get pods busybox2 -o yaml > mymanifest.yaml
  60. 61 vim mymanifest.yaml
  61. 62 kubectl run -h
  62. 63 kubectl run -h | less
  63. 64 kubectl run secondnginx --image=nginx --dry-run -o yaml
  64. 65 kubectl get pods -o wide
  65. 66 kubectl get pods --show-labels
  66. 67 kubectl get all --selector run=ghosts
  67. 68 kubectl get all --selector run=ghost
  68. 69 kubectl get all --selector app=my-dep
  69. 70 kubectl get all --selector app=my-dep --show-labels
  70. 71 kubectl get all
  71. 72 kubectl get svc
  72. 73 kubectl get all --show-labels
  73. 74 kubectl get all --selector k8s-app=firstnginx
  74. 75 kubectl get pods
  75. 76 kubectl get deployments
  76. 77 kubectl get all --show-namespaces
  77. 78 kubectl get all
  78. 79 kubectl get all --all-namespaces
  79. 80 kubectl get ns
  80. 81 kubectl create ns secret
  81. 82 vim busybox.yaml
  82. 83 kubectl apply -f busybox.yaml
  83. 84 kubectl get pods -A
  84. 85 history
  85. 86 kubectl get pods
  86. 87 kubectl describe pod my-dep-6f9f87db6f-px6gh
  87. 88 kubectl get pods
  88. 89 kubectl logs my-dep-6f9f87db6f-px6gh
  89. 90 kubectl logs firstnginx-7bf974b77f-
  90. 91 kubectl logs firstnginx-7bf974b77f-wtlsq
  91. 92 historty
  92. 93 history
  93. 94 kubectl get pods
  94. 95 kubectl exec -it busybox2 ls -l
  95. 96 kubectl exec -it busybox2 -- ls -l
  96. 97 kubectl exec -it busybox2 -- sh
  97. 98 ls
  98. 99 cat morevolumes.yaml
  99. 100 kubectl apply -f morevolumes.yaml
  100. 101 kubectl get pods
  101. 102 kubectl exec -it morevol2 -- ls
  102. 103 kubectl describe pod/morevol2 -n default
  103. 104 kubectl exec -it morevol2 -c centos2 -- ls
  104. 105 kubectl describe deployment | less
  105. 106 kubectl explain deployment | less
  106. 107 kubectl explain deployment.spec | less
  107. 108 kubectl get pods --show-labels
  108. 109 kubectl get all --selector k8s-app=firstnginx
  109. 110 kubectl delete pod firstnginx-7bf974b77f-wtlsq
  110. 111 kubectl get all --selector k8s-app=firstnginx
  111. 112 kubectl delete replicasets.apps firstnginx-7bf974b77f
  112. 113 kubectl get all --selector k8s-app=firstnginx
  113. 114 kubectl scale deployment --replicas=5 firstnginx
  114. 115 kubectl get all --selector k8s-app=firstnginx
  115. 116 history
  116. 117 ./countdown 12
  117. 118 kubectl get deploy
  118. 119 kubectl expose deployment -h
  119. 120 kubectl expose deployment firstnginx --port=80
  120. 121 kubectl get svc
  121. 122 kubectl get endpoints
  122. 123 minikube ssh
  123. 124 kubectl delete service firstnginx
  124. 125 kubectl get deploy
  125. 126 kubectl expose deployment firstnginx --port=80 --type=NodePort
  126. 127 kubectl get svc
  127. 128 minikube ip
  128. 129 curl 192.168.39.184:31722
  129. 130 kubectl explain pods.spec.volumes
  130. 131 kubectl explain pods.spec.volumes | less
  131. 132 vim morevolumes.yaml
  132. 133 kubectl describe pods morevol2
  133. 134 kubectl exec -it morevol2 -c centos1 -- touch /centos1/testfile
  134. 135 kubectl exec -it morevol2 -c centos2 -- ls -l /centos2/
  135. 136 vim morevolumes.yaml
  136. 137 ls
  137. 138 vim nfs-pv.yaml
  138. 139 kubectl create -f nfs-pv.yaml
  139. 140 vim nfs-pvc.yaml
  140. 141 kubectl get pv
  141. 142 kubectl create -f nfs-pvc.yaml
  142. 143 kubectl get pv
  143. 144 vim nfs-pv-pod.yaml
  144. 145 kubectl create -f nfs-pv-pod.yaml
  145. 146 kubectl get pods
  146. 147 kubectl describe nfs-pv-pod
  147. 148 kubectl describe pod nfs-pv-pod
  148. 149 history
Add Comment
Please, Sign In to add comment