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
+3
-3
@@ -894,7 +894,7 @@ configuration involves several manual steps:
|
||||
|
||||
1. Export the live object to a local configuration file:
|
||||
|
||||
kubectl get <kind>/<name> -o yaml --export > <kind>_<name>.yaml
|
||||
kubectl get <kind>/<name> -o yaml --export > <kind>_<name>.yaml
|
||||
|
||||
1. Manually remove the `status` field from the configuration file.
|
||||
|
||||
@@ -903,7 +903,7 @@ configuration involves several manual steps:
|
||||
|
||||
1. Set the `kubectl.kubernetes.io/last-applied-configuration` annotation on the object:
|
||||
|
||||
kubectl replace --save-config -f <kind>_<name>.yaml
|
||||
kubectl replace --save-config -f <kind>_<name>.yaml
|
||||
|
||||
1. Change processes to use `kubectl apply` for managing the object exclusively.
|
||||
|
||||
@@ -915,7 +915,7 @@ TODO(pwittrock): Why doesn't export remove the status field? Seems like it shou
|
||||
|
||||
1. Set the `kubectl.kubernetes.io/last-applied-configuration` annotation on the object:
|
||||
|
||||
kubectl replace --save-config -f <kind>_<name>.yaml
|
||||
kubectl replace --save-config -f <kind>_<name>.yaml
|
||||
|
||||
1. Change processes to use `kubectl apply` for managing the object exclusively.
|
||||
|
||||
|
||||
+2
-2
@@ -97,13 +97,13 @@ several manual steps.
|
||||
|
||||
1. Export the live object to a local object configuration file:
|
||||
|
||||
kubectl get <kind>/<name> -o yaml --export > <kind>_<name>.yaml
|
||||
kubectl get <kind>/<name> -o yaml --export > <kind>_<name>.yaml
|
||||
|
||||
1. Manually remove the status field from the object configuration file.
|
||||
|
||||
1. For subsequent object management, use `replace` exclusively.
|
||||
|
||||
kubectl replace -f <kind>_<name>.yaml
|
||||
kubectl replace -f <kind>_<name>.yaml
|
||||
|
||||
|
||||
## Defining controller selectors and PodTemplate labels
|
||||
|
||||
Reference in New Issue
Block a user