From 0370a306c39c8f776612b719586a603ac9bde43b Mon Sep 17 00:00:00 2001 From: WanLinghao Date: Sat, 12 May 2018 22:52:25 +0800 Subject: [PATCH] improve configure-projected-volume-storage.md (#8434) modified: content/en/docs/tasks/configure-pod-container/configure-projected-volume-storage.md --- .../configure-projected-volume-storage.md | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/content/en/docs/tasks/configure-pod-container/configure-projected-volume-storage.md b/content/en/docs/tasks/configure-pod-container/configure-projected-volume-storage.md index 9b90732c77..cf1e589eca 100644 --- a/content/en/docs/tasks/configure-pod-container/configure-projected-volume-storage.md +++ b/content/en/docs/tasks/configure-pod-container/configure-projected-volume-storage.md @@ -24,36 +24,37 @@ Here is the configuration file for the Pod: {{< code file="projected-volume.yaml" >}} 1. Create the Secrets: - - # Create files containing the username and password: +```shell + # Create files containing the username and password: echo -n "admin" > ./username.txt echo -n "1f2d1e2e67df" > ./password.txt - # Package these files into secrets: + # Package these files into secrets: kubectl create secret generic user --from-file=./username.txt kubectl create secret generic pass --from-file=./password.txt - +``` 1. Create the Pod: - +```shell kubectl create -f https://k8s.io/docs/tasks/configure-pod-container/projected-volume.yaml - +``` 1. Verify that the Pod's Container is running, and then watch for changes to the Pod: - +```shell kubectl get --watch pod test-projected-volume - +``` The output looks like this: NAME READY STATUS RESTARTS AGE test-projected-volume 1/1 Running 0 14s 1. In another terminal, get a shell to the running Container: - +```shell kubectl exec -it test-projected-volume -- /bin/sh - +``` 1. In your shell, verify that the `projected-volume` directory contains your projected sources: - - / # ls /projected-volume/ +```shell + ls /projected-volume/ +``` {{% /capture %}} {{% capture whatsnext %}}