Getting error when kubectl port-forward command is executed

Hi all, I am using the helm chart for creation of tyk API gateway service and redis server.
When I executed the command
controlplane $ kubectl port-forward service/gateway-svc-tyk-ce-tyk-headless 8080:443
I got an error message saying
Error from server (NotFound): services “gateway-svc-tyk-ce-tyk-headless” not found

Let me know what could be the reason.

Additional Information - I also executed the command
controlplane $ kubectl get all -n tyk
It displayed the service name properly as below
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/gateway-svc-tyk-ce-tyk-headless NodePort 10.111.184.14 443:30282/TCP 21m
service/redis ClusterIP 10.106.195.213 6379/TCP 22m

It will be really helpful to me if someone has got any reason about it.

Thanks
Nagaraj Trivedi

Hi,

Your command is missing the namespace argument. Try it with “-n tyk” please!