Update hello-minikube.md

pull/39190/head
Jun10ng 2023-01-31 22:53:08 +08:00 committed by GitHub
parent 3906c450c9
commit 4129e07703
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 5 deletions

View File

@ -90,14 +90,17 @@ tutorial has only one Container. A Kubernetes
Pod and restarts the Pod's Container if it terminates. Deployments are the Pod and restarts the Pod's Container if it terminates. Deployments are the
recommended way to manage the creation and scaling of Pods. recommended way to manage the creation and scaling of Pods.
1. Use the `kubectl create` command to create a Deployment that manages a Pod. The 1. Katacoda environment only: At the top of the terminal pane, click the plus sign, and then click open a new terminal.
2. Use the `kubectl create` command to create a Deployment that manages a Pod. The
Pod runs a Container based on the provided Docker image. Pod runs a Container based on the provided Docker image.
```shell ```shell
kubectl create deployment hello-node --image=registry.k8s.io/e2e-test-images/agnhost:2.39 -- /agnhost netexec --http-port=8080 kubectl create deployment hello-node --image=registry.k8s.io/e2e-test-images/agnhost:2.39 -- /agnhost netexec --http-port=8080
``` ```
2. View the Deployment: 3. View the Deployment:
```shell ```shell
kubectl get deployments kubectl get deployments
@ -110,7 +113,7 @@ Pod runs a Container based on the provided Docker image.
hello-node 1/1 1 1 1m hello-node 1/1 1 1 1m
``` ```
3. View the Pod: 4. View the Pod:
```shell ```shell
kubectl get pods kubectl get pods
@ -123,13 +126,13 @@ Pod runs a Container based on the provided Docker image.
hello-node-5f76cf6ccf-br9b5 1/1 Running 0 1m hello-node-5f76cf6ccf-br9b5 1/1 Running 0 1m
``` ```
4. View cluster events: 5. View cluster events:
```shell ```shell
kubectl get events kubectl get events
``` ```
5. View the `kubectl` configuration: 6. View the `kubectl` configuration:
```shell ```shell
kubectl config view kubectl config view