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

doesn't apply oidc parameters to kube-apiserver #7786

Closed
chukynax opened this issue Jul 9, 2021 · 9 comments
Closed

doesn't apply oidc parameters to kube-apiserver #7786

chukynax opened this issue Jul 9, 2021 · 9 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@chukynax
Copy link

chukynax commented Jul 9, 2021

Environment:

Kubespray version (commit) (git rev-parse --short HEAD):
v2.14.1

Network plugin used:
Calico

Ansible doesn't apply defined in
kube_oidc_auth: true
kube_oidc_url: https://dex.domain.com
kube_oidc_client_id: kubernetes
kube_oidc_ca_file: "{{ kube_cert_dir }}/ca.pem"
kube_oidc_username_claim: sub
kube_oidc_username_prefix: "oidc:"
kube_oidc_groups_claim: "groups"
kube_oidc_groups_prefix: "oidc:"

to /etc/kubernetes/manifests/kube-apiserver.yaml

therefore kube-apiserver pod doesn't have these parameters

@chukynax chukynax added the kind/bug Categorizes issue or PR as related to a bug. label Jul 9, 2021
@dgo-
Copy link

dgo- commented Jul 22, 2021

I am running in the same issue today.

I rerun cluster.yml to apply the oidc settings to the control plane.

I set the following group variables regarding oidc

kube_oidc_url: https://example.domain
kube_oidc_client_id: kubernetes
kube_oidc_username_claim: email
kube_oidc_username_prefix: "oidc:"
kube_oidc_groups_claim: groups
kube_oidc_groups_prefix: "oidc:" 

I see that the values are added to /etc/kubernetes/kubeadm-config.yaml

....
apiServer:
  extraArgs:
    oidc-issuer-url: "https://example.domain"
    oidc-client-id: "kubernetes"
    oidc-username-claim: "email"
    oidc-groups-claim: "groups"
    oidc-username-prefix: "oidc:"
    oidc-groups-prefix: "oidc:"
....

But no oidc entry in the /etc/kubernetes/manifests/kube-apiserver.yaml

@crinjes
Copy link

crinjes commented Sep 9, 2021

I've noticed the same using the v2.16.0 docker image. Kubeadm config is generated, but whatever makes kubeadm generate the updated kube-apiserver manifest is not run when using cluster.yml.

Two options that work:

Related: #4736

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 8, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 7, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@chukynax
Copy link
Author

it didnt work for me ... both scenarios

@muratcabuk
Copy link

if we enable oidc after the cluster is deployed and apply to cluster it is not changing kube-apiserver settings.

@hhk7734
Copy link

hhk7734 commented Dec 8, 2024

I manually executed kubeadm init phase control-plane apiserver --config=/etc/kubernetes/kubeadm-config.yaml on the kube_control_plane nodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

7 participants