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
This commit is contained in:
parent
6cb186c144
commit
be5be27a8e
4 changed files with 5 additions and 5 deletions
|
@ -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`
|
||||
|
|
|
@ -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`
|
||||
|
|
|
@ -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`
|
||||
|
|
|
@ -65,7 +65,7 @@ $ kubectl get pods -n <namespace-of-ingress-controller>
|
|||
NAME READY STATUS RESTARTS AGE
|
||||
nginx-ingress-controller-67956bf89d-fv58j 1/1 Running 0 1m
|
||||
|
||||
$ kubectl exec -it -n <namespace-of-ingress-controller> nginx-ingress-controller-67956bf89d-fv58j cat /etc/nginx/nginx.conf
|
||||
$ kubectl exec -it -n <namespace-of-ingress-controller> 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
|
||||
|
|
Loading…
Reference in a new issue