|
45 | 45 | ## Commands
|
46 | 46 |
|
47 | 47 | ```
|
| 48 | +docker run -p 8080:8080 in28min/hello-world-rest-api:0.0.1.RELEASE |
| 49 | +
|
| 50 | +kubectl create deployment hello-world-rest-api --image=in28min/hello-world-rest-api:0.0.1.RELEASE |
| 51 | +kubectl expose deployment hello-world-rest-api --type=LoadBalancer --port=8080 |
| 52 | +kubectl scale deployment hello-world-rest-api --replicas=3 |
| 53 | +kubectl delete pod hello-world-rest-api-58ff5dd898-62l9d |
| 54 | +kubectl autoscale deployment hello-world-rest-api --max=10 --cpu-percent=70 |
| 55 | +kubectl edit deployment hello-world-rest-api #minReadySeconds: 15 |
| 56 | +kubectl set image deployment hello-world-rest-api hello-world-rest-api=in28min/hello-world-rest-api:0.0.2.RELEASE |
| 57 | +
|
| 58 | +gcloud container clusters get-credentials in28minutes-cluster --zone us-central1-a --project solid-course-258105 |
| 59 | +kubectl create deployment hello-world-rest-api --image=in28min/hello-world-rest-api:0.0.1.RELEASE |
| 60 | +kubectl expose deployment hello-world-rest-api --type=LoadBalancer --port=8080 |
| 61 | +kubectl set image deployment hello-world-rest-api hello-world-rest-api=DUMMY_IMAGE:TEST |
| 62 | +kubectl get events --sort-by=.metadata.creationTimestamp |
| 63 | +kubectl set image deployment hello-world-rest-api hello-world-rest-api=in28min/hello-world-rest-api:0.0.2.RELEASE |
| 64 | +kubectl get events --sort-by=.metadata.creationTimestamp |
| 65 | +kubectl get componentstatuses |
| 66 | +kubectl get pods --all-namespaces |
| 67 | +
|
| 68 | +kubectl get events |
| 69 | +kubectl get pods |
| 70 | +kubectl get replicaset |
| 71 | +kubectl get deployment |
| 72 | +kubectl get service |
| 73 | +
|
| 74 | +kubectl get pods -o wide |
| 75 | +
|
| 76 | +kubectl explain pods |
| 77 | +kubectl get pods -o wide |
| 78 | +
|
| 79 | +kubectl describe pod hello-world-rest-api-58ff5dd898-9trh2 |
| 80 | +
|
| 81 | +kubectl get replicasets |
| 82 | +kubectl get replicaset |
| 83 | +
|
| 84 | +kubectl scale deployment hello-world-rest-api --replicas=3 |
| 85 | +kubectl get pods |
| 86 | +kubectl get replicaset |
| 87 | +kubectl get events |
| 88 | +kubectl get events --sort.by=.metadata.creationTimestamp |
| 89 | +
|
| 90 | +kubectl get rs |
| 91 | +kubectl get rs -o wide |
| 92 | +kubectl set image deployment hello-world-rest-api hello-world-rest-api=DUMMY_IMAGE:TEST |
| 93 | +kubectl get rs -o wide |
| 94 | +kubectl get pods |
| 95 | +kubectl describe pod hello-world-rest-api-85995ddd5c-msjsm |
| 96 | +kubectl get events --sort-by=.metadata.creationTimestamp |
| 97 | +
|
| 98 | +kubectl set image deployment hello-world-rest-api hello-world-rest-api=in28min/hello-world-rest-api:0.0.2.RELEASE |
| 99 | +kubectl get events --sort-by=.metadata.creationTimestamp |
| 100 | +kubectl get pods -o wide |
| 101 | +kubectl delete pod hello-world-rest-api-67c79fd44f-n6c7l |
| 102 | +kubectl get pods -o wide |
| 103 | +kubectl delete pod hello-world-rest-api-67c79fd44f-8bhdt |
| 104 | +
|
| 105 | +kubectl get componentstatuses |
| 106 | +kubectl get pods --all-namespaces |
| 107 | +
|
| 108 | +gcloud auth login |
| 109 | +kubectl version |
| 110 | +gcloud container clusters get-credentials in28minutes-cluster --zone us-central1-a --project solid-course-258105 |
| 111 | +
|
48 | 112 | kubectl rollout history deployment hello-world-rest-api
|
49 | 113 | kubectl set image deployment hello-world-rest-api hello-world-rest-api=in28min/hello-world-rest-api:0.0.3.RELEASE --record=true
|
50 | 114 | kubectl rollout undo deployment hello-world-rest-api --to-revision=1
|
|
0 commit comments