OpenUnison / openunison-k8s-login-activedirectory

Login portal for Kubernetes using Active Directory. Provides authentication and SSO for kubectl and for the dashboard.
Apache License 2.0
41 stars 13 forks source link

kubectl describe configmap api-server-config -n openunison returns empty certificate #55

Open TomerG711 opened 4 years ago

TomerG711 commented 4 years ago

I've followed the provided video: https://vimeo.com/297399119, and installed OpenUnison. However, when I run the command to get the configmap that contains the certificate for the server api, as in 2:00 in the video, I get:

Data
===
oidc-api-server-flags:
---
---oidc-issuer-url=....

(The other oidc flags are given OK).

Why don't I get the certificate?

mlbiam commented 4 years ago

We need to update the videos. When we moved to an operator based model the location of the certificate changed. In the readme (https://github.com/OpenUnison/openunison-k8s-login-activedirectory#complete-sso-integration-with-kubernetes) it says where to get the cert.

TomerG711 commented 4 years ago

@mlbiam Great, I found the cert and edited the api server yaml as required.

Then, when I log into the OpenUnison(https://openunison.tremolo.lan), I get both of the certs - OU server CA certificate and Kubernetes API Server CA certificate, and add both to my PC (under the Microsoft Management Console for Windows 10). Then I run the kubectl Windows Command (again, from https://openunison.tremolo.lan) and everything goes fine, but when I run kubectl get nodes (on my PC) I get the following error: Unable to connect to the server: Get https://openunison.tremolo.lan/auth/idp/k8sIdp/.well-known-openid-configuration: x509: certificate is valid for openunison.openunison.svc.cluster.local, not openunison.tremolo.lan

Did I forget any step?

mlbiam commented 4 years ago

is openunison.tremolo.lan pointing to your ingress load balancer?

TomerG711 commented 4 years ago

@mlbiam Yes it does.

TomerG711 commented 4 years ago

@mlbiam Any idea why does it happen?

TomerG711 commented 4 years ago

@mlbiam ?

TomerG711 commented 4 years ago

@mlbiam Any idea?