ericchiang / k8s

A simple Kubernetes Go client
Apache License 2.0
599 stars 108 forks source link

Support client-go credential plugins #115

Closed nlowe closed 5 years ago

nlowe commented 5 years ago

kubectl (and other tools based on client-go) support credential plugins like aws-iam-authenticator. However, when I interact with the API to an EKS cluster via this package, it doesn't seem to be calling aws-iam-authenticator. For example: Getting all pods in the default namespace:

kubernetes api: Failure 403 pods is forbidden: User "system:anonymous" cannot list pods at the cluster scope
ericchiang commented 5 years ago

Credential providers and full kubeconfig loading are out of scope for this client, which is intended for in-cluster configs.

If you'd like to parse and load it yourself, use Client.SetHeader or provide an http.Client with a custom tls.Config https://godoc.org/github.com/ericchiang/k8s#Client