Can not exec into consul ingress gateway pod

Hi, I am trying to exec the consul ingress gateway pod.n

kubectl exec -it consul-ingress-gateway-xxxxxx -c ingress-gateway bash

However, I get the following error:

OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "bash": executable file not found in $PATH: unknown
command terminated with exit code 126

Can someone please help me with this issue

It looks like there is no bash in your container. Try sh instead.

I tried sh. However, I can not curl if I use sh. I need to curl and check the config of the proxy

Hi @zara.butt ,

Instead of exec’ing into ingress-gateway container (-c ingress-gateway), use the consul-sidecar container. It has curl available and being containers in the same pod, they share the same network namespace. So you will be able to talk to envoy proxy on port 19000.

kubectl exec -it consul-ingress-gateway-xxxxxx -c consul-sidecar sh

Thank you, it worked!