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:
Ahmet Alp Balkan
2017-08-05 21:22:56 -07:00
committed by Andrew Chen
parent 0c6bca5b7f
commit a86d9355b0
20 changed files with 93 additions and 93 deletions
@@ -45,11 +45,11 @@ for the `Pod`:
1. Create a Pod based on the YAML configuration file:
kubectl create -f https://k8s.io/docs/tasks/configure-pod-container/cpu-ram.yaml
kubectl create -f https://k8s.io/docs/tasks/configure-pod-container/cpu-ram.yaml
1. Display information about the pod:
kubectl describe pod cpu-ram-demo
kubectl describe pod cpu-ram-demo
The output is similar to this:
@@ -19,7 +19,7 @@ Kubernetes cluster.
1. List the nodes in your cluster:
kubectl get nodes
kubectl get nodes
The output is similar to this:
@@ -30,13 +30,13 @@ Kubernetes cluster.
1. Chose one of your nodes, and add a label to it:
kubectl label nodes <your-node-name> disktype=ssd
kubectl label nodes <your-node-name> disktype=ssd
where `<your-node-name>` is the name of your chosen node.
1. Verify that your chosen node has a `disktype=ssd` label:
kubectl get nodes --show-labels
kubectl get nodes --show-labels
The output is similar to this:
@@ -60,11 +60,11 @@ a `disktype=ssd` label.
1. Use the configuration file to create a pod that will get scheduled on your
chosen node:
kubectl create -f https://k8s.io/docs/tasks/configure-pod-container/pod.yaml
kubectl create -f https://k8s.io/docs/tasks/configure-pod-container/pod.yaml
1. Verify that the pod is running on your chosen node:
kubectl get pods --output=wide
kubectl get pods --output=wide
The output is similar to this:
@@ -24,22 +24,22 @@ Here is the configuration file for the Pod:
1. Create the Secrets:
# Create files containing the username and password:
echo -n "admin" > ./username.txt
echo -n "1f2d1e2e67df" > ./password.txt
# Create files containing the username and password:
echo -n "admin" > ./username.txt
echo -n "1f2d1e2e67df" > ./password.txt
# Package these files into secrets:
kubectl create secret generic user --from-file=./username.txt
kubectl create secret generic pass --from-file=./password.txt
# 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:
kubectl create -f projected-volume.yaml
kubectl create -f projected-volume.yaml
1. Verify that the Pod's Container is running, and then watch for changes to
the Pod:
kubectl get --watch pod test-projected-volume
kubectl get --watch pod test-projected-volume
The output looks like this:
@@ -48,11 +48,11 @@ the Pod:
1. In another terminal, get a shell to the running Container:
kubectl exec -it test-projected-volume -- /bin/sh
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/
/ # ls /projected-volume/
{% endcapture %}
{% capture whatsnext %}