-
Notifications
You must be signed in to change notification settings - Fork 6
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
kube config certificate #124
Comments
what is side note - are you using impersonation? I'm pretty sure it will work fine with websockets i've just never tried it. |
Impersonation is the line:
? |
Hm, if it's false then there shouldn't be any cert. The cert only gets included if it's created by the operator or it's explicitly included. I know you said the cert is signed by a common CA. Another option is to include it as the
right, i was curious if you were using impersonation. you're not so it wouldn't matter to OU. |
It might be that just including it is going to end up being the simplest - though presumably in doing that at some point (albeit a while away) we'll need to udpate the config when the certificates eventually expire, or if we change proxy providers (and the new one uses a different CA); in contrast to not having the CA listed at all in the kube config, where it'll continue to work so long as it's using one of the common CAs..?
|
If I put a cert in |
If I'm following what is meant to happen, with impersonation off, the tokens page (which I presume matches the info that Hopefully the above |
I found the issue. I was confusing the OpenUnison cert with the API server cert. Sorry for that. I update the docs on how to handle your usecase - https://openunison.github.io/knowledgebase/certificates/#how-do-i-trust-my-api-servers-certificate I tested this out and the api server certificate doesn't get set |
Thank you, that's exactly what I was after! Just before this gets rolled out to the devs, tho it's only slightly related to the kube config certificates... ❯ kubectl get pods
E0905 11:32:15.368861 35553 memcache.go:265] "Unhandled Error" err=<
couldn't get current server API group list: Get "https://k8s-api/api?timeout=32s": failed to refresh token: oauth2: cannot fetch token: 401 Unauthorized
Response:
>
E0905 11:32:15.612322 35553 memcache.go:265] "Unhandled Error" err=<
couldn't get current server API group list: Get "https://k8s-api/api?timeout=32s": failed to refresh token: oauth2: cannot fetch token: 401 Unauthorized
Response:
>
E0905 11:32:15.843542 35553 memcache.go:265] "Unhandled Error" err=<
couldn't get current server API group list: Get "https://k8s-api/api?timeout=32s": failed to refresh token: oauth2: cannot fetch token: 401 Unauthorized
Response:
>
E0905 11:32:16.065723 35553 memcache.go:265] "Unhandled Error" err=<
couldn't get current server API group list: Get "https://k8s-api/api?timeout=32s": failed to refresh token: oauth2: cannot fetch token: 401 Unauthorized
Response:
>
E0905 11:32:16.274359 35553 memcache.go:265] "Unhandled Error" err=<
couldn't get current server API group list: Get "https://k8s-api/api?timeout=32s": failed to refresh token: oauth2: cannot fetch token: 401 Unauthorized
Response:
>
Unable to connect to the server: failed to refresh token: oauth2: cannot fetch token: 401 Unauthorized
Response:
Following that with a |
We're setting up the next stage of our systems with OpenUnison underpinning the auth (via Google/oidc); in the cluster environment we're using HAProxy to provide a stable IP for the k8s API, but effectively all access to the cluster is from outside.
The external access is provided (and controlled) by a thirdy party proxy (we ended up on 1.31 which finally switched to web sockets by default for
kubectl exec
); this third party proxy has a certificate that's been issued by something large (Google, IIRC) meaning that the~/.kube/config
file works without acertificate-authority-data
entry.Currently
kubectl oulogin
will reinsert the certificate authority data entry when it's run, and because the internal cluster has a certificate it's clobbering the kube-config values. In theory, I think, we should be able to convincekubectl oulogin
to hand out a chain that matched the proxy cert, but that would mean it was wrong for inside-the-cluster-environment (and I'm not having much luck doing that).As the proxy cert is automagically trusted, simply not populating the certificate authority would work. Is there a way to do this? Or would a paramter to like
kubectl oulogin --no-certificate-authority
be a possibility?It's all working well at the moment, aside from a manual deletion of the
certificate-authority-data
line everytime Ikubectl oulogin
(which can be a couple of times a day); A workaround would be to wrap mykubectl oulogin
in a script that edited the kube config each time, but that's a bit of a hack.The text was updated successfully, but these errors were encountered: