Add content in init-containers.md

Add description to make it easy to read.
* Distinguish between 'command'and 'output'.
pull/25871/head
Ader 2020-12-30 20:43:57 +08:00 committed by GitHub
parent 5af14b42ac
commit 4ff57afdea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -133,6 +133,7 @@ You can start this Pod by running:
```shell ```shell
kubectl apply -f myapp.yaml kubectl apply -f myapp.yaml
``` ```
The output is similar to this:
``` ```
pod/myapp-pod created pod/myapp-pod created
``` ```
@ -141,6 +142,7 @@ And check on its status with:
```shell ```shell
kubectl get -f myapp.yaml kubectl get -f myapp.yaml
``` ```
The output is similar to this:
``` ```
NAME READY STATUS RESTARTS AGE NAME READY STATUS RESTARTS AGE
myapp-pod 0/1 Init:0/2 0 6m myapp-pod 0/1 Init:0/2 0 6m
@ -150,6 +152,7 @@ or for more details:
```shell ```shell
kubectl describe -f myapp.yaml kubectl describe -f myapp.yaml
``` ```
The output is similar to this:
``` ```
Name: myapp-pod Name: myapp-pod
Namespace: default Namespace: default
@ -224,6 +227,7 @@ To create the `mydb` and `myservice` services:
```shell ```shell
kubectl apply -f services.yaml kubectl apply -f services.yaml
``` ```
The output is similar to this:
``` ```
service/myservice created service/myservice created
service/mydb created service/mydb created
@ -235,6 +239,7 @@ Pod moves into the Running state:
```shell ```shell
kubectl get -f myapp.yaml kubectl get -f myapp.yaml
``` ```
The output is similar to this:
``` ```
NAME READY STATUS RESTARTS AGE NAME READY STATUS RESTARTS AGE
myapp-pod 1/1 Running 0 9m myapp-pod 1/1 Running 0 9m
@ -319,11 +324,9 @@ reasons:
## {{% heading "whatsnext" %}} ## {{% heading "whatsnext" %}}
* Read about [creating a Pod that has an init container](/docs/tasks/configure-pod-container/configure-pod-initialization/#create-a-pod-that-has-an-init-container) * Read about [creating a Pod that has an init container](/docs/tasks/configure-pod-container/configure-pod-initialization/#create-a-pod-that-has-an-init-container)
* Learn how to [debug init containers](/docs/tasks/debug-application-cluster/debug-init-containers/) * Learn how to [debug init containers](/docs/tasks/debug-application-cluster/debug-init-containers/)