Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for Unauthorized error when loading certs through kubeconfig #192

Merged
merged 1 commit into from
Feb 21, 2018
Merged

fix for Unauthorized error when loading certs through kubeconfig #192

merged 1 commit into from
Feb 21, 2018

Conversation

karthikkondapally
Copy link
Contributor

when loading certs through Kubeconfig (Config.fromConfig(..) || Config.defaultClient(..) || ClientBuilder.defaultClient()) getting following error :

Exception in thread "main" io.kubernetes.client.ApiException: Unauthorized
	at io.kubernetes.client.ApiClient.handleResponse(ApiClient.java:883)
	at io.kubernetes.client.ApiClient.execute(ApiClient.java:799)
	at io.kubernetes.client.apis.CoreV1Api.listPodForAllNamespacesWithHttpInfo(CoreV1Api.java:18462)
	at io.kubernetes.client.apis.CoreV1Api.listPodForAllNamespaces(CoreV1Api.java:18440)
	at io.kubernetes.client.examples.Example.main(Example.java:40)

it is because keyManagers are not set, when loading certs in KubeconfigAuthentication.provide

@brendandburns
Copy link
Contributor

LGTM, thanks!

@brendandburns brendandburns merged commit 77b93f1 into kubernetes-client:master Feb 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants