From be5be27a8e72f596a5987f6434534c26f236de33 Mon Sep 17 00:00:00 2001 From: wi1dcard Date: Thu, 9 Jul 2020 09:24:50 +0800 Subject: [PATCH] Fix kubectl exec deprecated usage in docs. See: * https://github.com/kubernetes/kubernetes/pull/88460 * https://github.com/kubernetes/kubectl/blob/master/pkg/cmd/exec/exec.go#L180 --- docs/examples/customization/configuration-snippets/README.md | 2 +- docs/examples/customization/custom-headers/README.md | 2 +- docs/examples/customization/ssl-dh-param/README.md | 2 +- docs/troubleshooting.md | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/examples/customization/configuration-snippets/README.md b/docs/examples/customization/configuration-snippets/README.md index 99f1fb151..ef7b38b74 100644 --- a/docs/examples/customization/configuration-snippets/README.md +++ b/docs/examples/customization/configuration-snippets/README.md @@ -11,4 +11,4 @@ $ kubectl apply -f ingress.yaml ## Test Check if the contents of the annotation are present in the nginx.conf file using: -`kubectl exec ingress-nginx-controller-873061567-4n3k2 -n kube-system cat /etc/nginx/nginx.conf` +`kubectl exec ingress-nginx-controller-873061567-4n3k2 -n kube-system -- cat /etc/nginx/nginx.conf` diff --git a/docs/examples/customization/custom-headers/README.md b/docs/examples/customization/custom-headers/README.md index cb7c251e6..99af78408 100644 --- a/docs/examples/customization/custom-headers/README.md +++ b/docs/examples/customization/custom-headers/README.md @@ -21,4 +21,4 @@ The nginx ingress controller will read the `ingress-nginx/ingress-nginx-controll ## Test Check the contents of the ConfigMaps are present in the nginx.conf file using: -`kubectl exec ingress-nginx-controller-873061567-4n3k2 -n ingress-nginx cat /etc/nginx/nginx.conf` +`kubectl exec ingress-nginx-controller-873061567-4n3k2 -n ingress-nginx -- cat /etc/nginx/nginx.conf` diff --git a/docs/examples/customization/ssl-dh-param/README.md b/docs/examples/customization/ssl-dh-param/README.md index e9c936eee..9029b834b 100644 --- a/docs/examples/customization/ssl-dh-param/README.md +++ b/docs/examples/customization/ssl-dh-param/README.md @@ -52,4 +52,4 @@ $ kubectl create -f ssl-dh-param.yaml ## Test Check the contents of the configmap is present in the nginx.conf file using: -`kubectl exec ingress-nginx-controller-873061567-4n3k2 -n kube-system cat /etc/nginx/nginx.conf` +`kubectl exec ingress-nginx-controller-873061567-4n3k2 -n kube-system -- cat /etc/nginx/nginx.conf` diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 6f9f31dc4..1707aa0e2 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -65,7 +65,7 @@ $ kubectl get pods -n NAME READY STATUS RESTARTS AGE nginx-ingress-controller-67956bf89d-fv58j 1/1 Running 0 1m -$ kubectl exec -it -n nginx-ingress-controller-67956bf89d-fv58j cat /etc/nginx/nginx.conf +$ kubectl exec -it -n nginx-ingress-controller-67956bf89d-fv58j -- cat /etc/nginx/nginx.conf daemon off; worker_processes 2; pid /run/nginx.pid; @@ -181,7 +181,7 @@ NAME READY STATUS RESTARTS AGE test-701078429-s5kca 1/1 Running 0 16s # check if secret exists -$ kubectl exec test-701078429-s5kca ls /var/run/secrets/kubernetes.io/serviceaccount/ +$ kubectl exec test-701078429-s5kca -- ls /var/run/secrets/kubernetes.io/serviceaccount/ ca.crt namespace token