79308710

Date: 2024-12-26 05:18:30
Score: 2.5
Natty:
Report link

We are using GCE with k8s, where we are deploying pods on GCE servers, and service accounts are linked with server that the pod is deployed on, and not directly with the pod itself.

The issue was that in k8s yaml file, used to deploy the pod, we were not setting hostNetwork. After setting hostNetwork to true the metadata request returned result successfully.

Before this setting, I guess the pod will run in it's own network instead of using the server's network. More info: What is hostNetwork in Kubernetes?

Reasons:
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Akshansh Jain