Fix leading spaces in kubectl commands
This is causing bash/zsh shells to not to record the executed command in the history. See this link for details: https://unix.stackexchange.com/questions/115917/why-is-bash-not-storing-commands-that-start-with-spaces Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
committed by
Andrew Chen
parent
0c6bca5b7f
commit
a86d9355b0
@@ -37,16 +37,16 @@ username and password:
|
||||
|
||||
1. Create the Secret
|
||||
|
||||
kubectl create -f secret.yaml
|
||||
kubectl create -f secret.yaml
|
||||
|
||||
**Note:** If you want to skip the Base64 encoding step, you can create a Secret
|
||||
by using the `kubectl create secret` command:
|
||||
|
||||
kubectl create secret generic test-secret --from-literal=username='my-app' --from-literal=password='39528$vdg7Jb'
|
||||
kubectl create secret generic test-secret --from-literal=username='my-app' --from-literal=password='39528$vdg7Jb'
|
||||
|
||||
1. View information about the Secret:
|
||||
|
||||
kubectl get secret test-secret
|
||||
kubectl get secret test-secret
|
||||
|
||||
Output:
|
||||
|
||||
@@ -56,7 +56,7 @@ username and password:
|
||||
|
||||
1. View more detailed information about the Secret:
|
||||
|
||||
kubectl describe secret test-secret
|
||||
kubectl describe secret test-secret
|
||||
|
||||
Output:
|
||||
|
||||
@@ -80,11 +80,11 @@ Here is a configuration file you can use to create a Pod:
|
||||
|
||||
1. Create the Pod:
|
||||
|
||||
kubectl create -f secret-pod.yaml
|
||||
kubectl create -f secret-pod.yaml
|
||||
|
||||
1. Verify that your Pod is running:
|
||||
|
||||
kubectl get pod secret-test-pod
|
||||
kubectl get pod secret-test-pod
|
||||
|
||||
Output:
|
||||
|
||||
@@ -94,7 +94,7 @@ Here is a configuration file you can use to create a Pod:
|
||||
|
||||
1. Get a shell into the Container that is running in your Pod:
|
||||
|
||||
kubectl exec -it secret-test-pod -- /bin/bash
|
||||
kubectl exec -it secret-test-pod -- /bin/bash
|
||||
|
||||
1. The secret data is exposed to the Container through a Volume mounted under
|
||||
`/etc/secret-volume`. In your shell, go to the directory where the secret data
|
||||
@@ -127,11 +127,11 @@ Here is a configuration file you can use to create a Pod:
|
||||
|
||||
1. Create the Pod:
|
||||
|
||||
kubectl create -f secret-envars-pod.yaml
|
||||
kubectl create -f secret-envars-pod.yaml
|
||||
|
||||
1. Verify that your Pod is running:
|
||||
|
||||
kubectl get pod secret-envars-test-pod
|
||||
kubectl get pod secret-envars-test-pod
|
||||
|
||||
Output:
|
||||
|
||||
@@ -140,7 +140,7 @@ Here is a configuration file you can use to create a Pod:
|
||||
|
||||
1. Get a shell into the Container that is running in your Pod:
|
||||
|
||||
kubectl exec -it secret-envars-test-pod -- /bin/bash
|
||||
kubectl exec -it secret-envars-test-pod -- /bin/bash
|
||||
|
||||
1. In your shell, display the environment variables:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user