sandervanvugt

Kube 4h sep20

Sep 21st, 2020
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.24 KB | None | 0 0
  1. 1 sudo -i
  2. 2 cd
  3. 3 git clone https://github.com/sandervanvugt/kubernetes
  4. 4 cd kubernetes/
  5. 5 ./kube-setup.sh
  6. 6 mount
  7. 7 apt-search exfat
  8. 8 apt-get search exfat
  9. 9 sudo apt-get search exfat
  10. 10 sudo uname -r
  11. 11 sudo add-apt-repository universe
  12. 12 sudo apt install exfat-fuse exfat-utils
  13. 13 cd
  14. 14 cd kubernetes/
  15. 15 cd ..
  16. 16 history
  17. 17 minikube status
  18. 18 kubectl get all
  19. 19 kubectl get nodes
  20. 20 cd kubernetes/
  21. 21 ls
  22. 22 ./countdown 12
  23. 23 minikube status
  24. 24 minikube ssh
  25. 25 kubectl cluster-info
  26. 26 minikube dashboard
  27. 27 kubectl get all
  28. 28 kubectl -h | less
  29. 29 kubectl completion -h | less
  30. 30 source <(kubectl completion bash)
  31. 31 kubectl get all
  32. 32 history
  33. 33 kubectl get all
  34. 34 kubectl get pods
  35. 35 kubectl get pods --all-namespaces
  36. 36 ./countdown 12
  37. 37 kubectl run -h | less
  38. 38 kubectl run nginx --image=nginx
  39. 39 kubectl get pods
  40. 40 kubectl delete pods firstnginx-5b8c4655fc-64pzn ; kubectl get pods
  41. 41 kubectl delete pods nginx
  42. 42 kubectl get pods
  43. 43 history
  44. 44 kubectl describe pod firstnginx-5b8c4655fc-qmhdr | less
  45. 45 kubectl get pods firstnginx-5b8c4655fc-qmhdr -o yaml | less
  46. 46 ls
  47. 47 vim busybox.yaml
  48. 48 kubectl create -f busybox.yaml
  49. 49 kubectl run mypod --image=nginx --dry-run=client -o yaml
  50. 50 kubectl run mypod --image=nginx --dry-run=client -o yaml > mypod.yaml
  51. 51 kubectl apply -f mypod.yaml
  52. 52 kubectl explain pods
  53. 53 kubectl explain pods.spec | less
  54. 54 kubectl explain pods.spec.containers | less
  55. 55 kubectl explain --recursive pods | less
  56. 56 history
  57. 57 kubectl create -h | less
  58. 58 kubectl create namespace -h | less
  59. 59 kubectl create namespace secret
  60. 60 kubectl get namespaces
  61. 61 vim busybox.yaml
  62. 62 kubectl creat -f busybox.yaml
  63. 63 kubectl create -f busybox.yaml
  64. 64 kubectl get pods
  65. 65 kubectl get pods --all-namespaces
  66. 66 kubectl get pods
  67. 67 kubectl describe pods mypod | less
  68. 68 kubectl logs firstnginx-5b8c4655fc-h2czt
  69. 69 kubectl get pods firstnginx-5b8c4655fc-qmhdr -o yaml | less
  70. 70 kubectl exec busybox2 -- /bin/sh
  71. 71 kubectl exec busybox2 -- cat /etc/hosts
  72. 72 kubectl exec -it busybox2 -- /bin/sh
  73. 73 kubectl exec -it busybox2 -c container1 -- /bin/sh
  74. 74 kubectl create deployment -h | less
  75. 75*
  76. 76 kubectl get all
  77. 77 kubectl describe pod myfailure-5f8c786bcb-cbxwp
  78. 78 kubectl get pods myfailure-5f8c786bcb-zxmtq -o yaml | less
  79. 79 kubectl create deployment -h | less
  80. 80 kubectl create deployment my-dep --image=busybox -- sleep 3600
  81. 81 kubectl get all
  82. 82 kubectl get all --show-labels
  83. 83 kubectl get all --selector app=my-dep
  84. 84 ./countdown 12
  85. 85 history
  86. 86 kubectl get deployments.apps
  87. 87 kubectl get deployments.apps --show-labels
  88. 88 kubectl get all --show-labels
  89. 89 kubectl get all --selector ks8-app=firstnginx --show-labels
  90. 90 kubectl get all --selector k8s-app=firstnginx
  91. 91 kubectl label pod firstnginx-5b8c4655fc-h2czt k8s-app-
  92. 92 kubectl get all --selector k8s-app=firstnginx
  93. 93 kubectl get pods
  94. 94 kubectl get pods -o wide
  95. 95 kubectl create deployment nginxsvc --image=nginx --replicas=3
  96. 96 kubectl get all --selector app=nginxsvc
  97. 97 kubectl expose deployment nginxsvc --port=80
  98. 98 kubectl get svc nginxsvc
  99. 99 kubectl get svc nginxsvc -o yaml
  100. 100 kubectl describe svc nginxsvc
  101. 101 kubectl get endpoints
  102. 102 kubectl svc
  103. 103 kubectl get svc
  104. 104 curl http://10.104.38.137
  105. 105 minikube ssh
  106. 106 kubectl edit svc nginxsvc
  107. 107 kubectl get svc
  108. 108 curl http://$(minikube ip):32000
  109. 109 minikube addons list
  110. 110 minikube addon enable ingress
  111. 111 minikube addons enable ingress
  112. 112 minikube addons enable ingress-dns
  113. 113 ls
  114. 114 cd ..
  115. 115 git clone https://github.com/sandervanvugt/ckad
  116. 116 cd ckad
  117. 117 curl http://$(minikube ip):32000
  118. 118 vim nginxsvc-ingress.yaml
  119. 119 kubectl apply -f nginxsvc-ingress.yaml
  120. 120 kubectl get ingress
  121. 121 minikube ip
  122. 122 sudo vim /etc/hosts
  123. 123 curl nginxsvc.info
  124. 124 history
  125.  
Add Comment
Please, Sign In to add comment