-
Hi I'm using the C# client to fetch information from api server. I decided to only partially use the client library to fetch "access token" that you need to attach as a bearer when making api requests. While the approach worked fine while testing locally all requests started failing when the pod ran inside the cluster. I added some logging so I could see what's happening inside the cluster:
When I run my pod inside a cluster the access token property is empty. And I get following message:
Does the client use some other authentication method when running inside the cluster? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
you can get token from the client will load token from the file above automatically free free to reopen if you still have any questions |
Beta Was this translation helpful? Give feedback.
-
Thanks for the timely clarification :) Guess I was expecting something different from a "config" object. |
Beta Was this translation helpful? Give feedback.
-
This item is closed but for future users who have this issue #1556 (comment) |
Beta Was this translation helpful? Give feedback.
you can get token from
/var/run/secrets/kubernetes.io/serviceaccount/token
the client will load token from the file above automatically
the config.token is for you to see static token and will not be populated
free free to reopen if you still have any questions