Skip to content
This repository was archived by the owner on Dec 10, 2021. It is now read-only.
This repository was archived by the owner on Dec 10, 2021. It is now read-only.

Unable to access the pods after setting up NAT #95

@ashu210890

Description

@ashu210890

I used the terraform NAT example to setup a NAT gateway for all egress from my GKE cluster. I tried the following ssh command that was given in the readme and it works:

gcloud compute ssh $(gcloud compute instances list --filter=name~nat-gateway-${REGION} --uri) --ssh-flag="-A" -- ssh $(gcloud compute instances list --filter=name~gke-${CLUSTER_NAME}- --limit=1 --format='value(name)') -o StrictHostKeyChecking=no

However, when In try to access the pods using kubectl exec or kubectl attach or kubectl logs , I get the following error:

Get https://10.156.0.7:10250/containerLogs/default/mypod-1538082480-2j4m5/mypod: No SSH tunnels currently open. Were the targets able to accept an ssh-key for user "gke-0d30f9eca605b3f9accd"

I already checked that the ssh forward firewall rule from GKE cluster master IP to to the nodes exists and seems correct. What am I doing wrong here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions