Skip to content

Access

The kubeconfig from the site holds no secret: kubectl signs you in through your browser with GitHub, using kubelogin. Install it once:

Terminal window
brew install int128/kubelogin/kubelogin # or: kubectl krew install oidc-login

You appear as github:<login> (kubectl auth whoami). Sessions last a day. To start over, delete ~/.kube/cache/oidc-login/. The CLI doesn’t need kubelogin.

No browser on the machine? Forward kubelogin’s port and open the URL it prints locally: ssh -L 8000:localhost:8000 remote-host.

  • Anything in your control plane’s namespace (named after it).
  • CRDs, and your custom resources in any namespace.
  • Read events in default.

You can’t create namespaces, touch kube-system, or change the RBAC ctrlplane manages.

Use a service account. It starts with read access to metrics and logs only; bind what it needs:

Terminal window
kubectl create serviceaccount ci
kubectl create rolebinding ci-edit --clusterrole=edit --serviceaccount=<you>-dev:ci
kubectl create role vms --verb='*' --resource=virtualmachines.example.com
kubectl create rolebinding ci-vms --role=vms --serviceaccount=<you>-dev:ci
kubectl create token ci --duration=720h