Skip to content
Connecting to Kubernetes Cluster (Admin)

Connecting to Kubernetes Cluster (Admin)

Clusters authenticate via static Admin credentials.

This should only be used, when Authentik is not available.

Prerequisites

  • Having kubectl and ansible-playbook installed.
  • SSH/Ansible access to the target cluster’s inventory.

1. Generate your kubeconfig

Clone Git repository:

git clone git@__GITLAB_URL__:foundation/infrastructure.git
cd infrastructure

Run inside the infrastructure repository the Ansible playbook:

ansible-playbook -i inventories/__ENV__/ playbooks/kubeconfig.yml

This writes to the kube config (default __ENV__.kubeconfig). Re-run it any time to regenerate the file.

2. Connect

Set the generated kube config file:

export KUBECONFIG=__ENV__.kubeconfig

Run kubectl commands:

kubectl get nodes