How to configure k8s API Server in kind - cniackz/public GitHub Wiki

  1. Create cluster

  2. Open Command Line Interface in the Control Plane Node

  3. apt update

  4. apt upgrade

  5. apt install vim

  6. vim /etc/kubernetes/manifests/kube-apiserver.yaml

  7. Add your flags, example:

spec:
  containers:
  - command:
    - kube-apiserver
    - --oidc-issuer-url=https://dev-xqm5ioqlmy7qyjvl.us.auth0.com <------------- Added this
    - --oidc-client-id=rMVc40T7fwgbEez1svp8wmjBtSaoKIOJ <----------------------- Added this
    - --advertise-address=172.18.0.4
  1. Wait for pods to restart

  2. reconnect

  3. kube api server will now contain your configuration:

  • Pod: kube-apiserver-kind-control-plane
  containers:
    - name: kube-apiserver
      image: registry.k8s.io/kube-apiserver:v1.29.2
      command:
        - kube-apiserver
        - '--oidc-issuer-url=https://dev-xqm5ioqlmy7qyjvl.us.auth0.com' <------- Added
        - '--oidc-client-id=rMVc40T7fwgbEez1svp8wmjBtSaoKIOJ' <----------------- Added
        - '--advertise-address=172.18.0.4'

NOTE: Don't edit directly the pod, is not allowed, modify file from node instead.