You are on page 1of 3

1.

kubectl create deployment hello-world-rest-api --image=in28min/hello-world-


rest-api:0.0.1.RELEASE
2. kubectl expose deployment hello-world-rest-api --type=LoadBalancer --
port=8080
3. kubectl scale deployment hello-world-rest-api --replicas=3
4. kubectl delete pod hello-world-rest-api-58ff5dd898-62l9d

5. kubectl autoscale deployment hello-world-rest-api --max=10 --cpu-percent=70


6. kubectl edit deployment hello-world-rest-api #minReadySeconds: 15

7. kubectl set image deployment hello-world-rest-api hello-world-rest-


api=in28min/hello-world-rest-api:0.0.2.RELEASE
8.
9. gcloud container clusters get-credentials in28minutes-cluster --zone us-
central1-a --project solid-course-258105
10. kubectl create deployment hello-world-rest-api --image=in28min/hello-world-
rest-api:0.0.1.RELEASE
11. kubectl expose deployment hello-world-rest-api --type=LoadBalancer --
port=8080
12. kubectl set image deployment hello-world-rest-api hello-world-rest-
api=DUMMY_IMAGE:TEST
13. kubectl get events --sort-by=.metadata.creationTimestamp
14. kubectl set image deployment hello-world-rest-api hello-world-rest-
api=in28min/hello-world-rest-api:0.0.2.RELEASE
15. kubectl get events --sort-by=.metadata.creationTimestamp
16. kubectl get componentstatuses
17. kubectl get pods --all-namespaces
18.
19. kubectl get events
20. kubectl get pods
21. kubectl get replicaset
22. kubectl get deployment
23. kubectl get service
24.
25. kubectl get pods -o wide
26.
27. kubectl explain pods
28. kubectl get pods -o wide
29.
30. kubectl describe pod hello-world-rest-api-58ff5dd898-9trh2
31.
32. kubectl get replicasets
33. kubectl get replicaset
34.
35. kubectl scale deployment hello-world-rest-api --replicas=3
36. kubectl get pods
37. kubectl get replicaset
38. kubectl get events
39. kubectl get events --sort.by=.metadata.creationTimestamp
40.
41. kubectl get rs
42. kubectl get rs -o wide
43. kubectl set image deployment hello-world-rest-api hello-world-rest-
api=DUMMY_IMAGE:TEST
44. kubectl get rs -o wide
45. kubectl get pods
46. kubectl describe pod hello-world-rest-api-85995ddd5c-msjsm
47. kubectl get events --sort-by=.metadata.creationTimestamp
48.

Page 1 of 3
49. kubectl set image deployment hello-world-rest-api hello-world-rest-
api=in28min/hello-world-rest-api:0.0.2.RELEASE
50. kubectl get events --sort-by=.metadata.creationTimestamp
51. kubectl get pods -o wide
52. kubectl delete pod hello-world-rest-api-67c79fd44f-n6c7l
53. kubectl get pods -o wide
54. kubectl delete pod hello-world-rest-api-67c79fd44f-8bhdt
55.
56. kubectl get componentstatuses
57. kubectl get pods --all-namespaces
58.
59. gcloud auth login
60. kubectl version
61. gcloud container clusters get-credentials in28minutes-cluster --zone us-
central1-a --project solid-course-258105
62.
63. kubectl rollout history deployment hello-world-rest-api
64. kubectl set image deployment hello-world-rest-api hello-world-rest-
api=in28min/hello-world-rest-api:0.0.3.RELEASE --record=true
65. kubectl rollout undo deployment hello-world-rest-api --to-revision=1
66.
67. kubectl logs hello-world-rest-api-58ff5dd898-6ctr2
68. kubectl logs -f hello-world-rest-api-58ff5dd898-6ctr2
69.
70. kubectl get deployment hello-world-rest-api -o yaml
71. kubectl get deployment hello-world-rest-api -o yaml > deployment.yaml
72. kubectl get service hello-world-rest-api -o yaml > service.yaml
73. kubectl apply -f deployment.yaml
74. kubectl get all -o wide
75. kubectl delete all -l app=hello-world-rest-api
76.
77. kubectl get svc --watch
78. kubectl diff -f deployment.yaml
79. kubectl delete deployment hello-world-rest-api
80. kubectl get all -o wide
81. kubectl delete replicaset.apps/hello-world-rest-api-797dd4b5dc
82.
83. kubectl get pods --all-namespaces
84. kubectl get pods --all-namespaces -l app=hello-world-rest-api
85. kubectl get services --all-namespaces
86. kubectl get services --all-namespaces --sort-by=.spec.type
87. kubectl get services --all-namespaces --sort-by=.metadata.name
88. kubectl cluster-info
89. kubectl cluster-info dump
90. kubectl top node
91. kubectl top pod
92. kubectl get services
93. kubectl get svc
94. kubectl get ev
95. kubectl get rs
96. kubectl get ns
97. kubectl get nodes
98. kubectl get no
99. kubectl get pods
100. kubectl get po
101.
102. kubectl delete all -l app=hello-world-rest-api
103. kubectl get all
104.
105. kubectl apply -f deployment.yaml

Page 2 of 3
106. kubectl apply -f ../currency-conversion/deployment.yaml

http://35.224.129.235:3000/

Page 3 of 3

You might also like