Connect a Kubernetes cluster

Create an access key

Download the Infra CLI:

Download via homebrew:

brew install infrahq/tap/infra

Next, log in:

infra login <org>.infrahq.com

Then, create an access key:

INFRA_ACCESS_KEY=$(infra keys add --connector -q)

Connect cluster

Install Infra connector via Helm:

helm repo add infrahq https://infrahq.github.io/helm-charts
helm repo update
helm install infra infrahq/infra --set config.name=example --set config.accessKey=$INFRA_ACCESS_KEY

It may take a few minutes for your cluster to connect.

To finish, verify that your cluster is connected:

infra destinations list

Access your cluster

Grant yourself access to the cluster:

infra grants add <your user email> example --role view

Next, verify your access:

infra list

Then, run kubectl to switch to your newly connected cluster.

kubectl config use-context infra:example

Alternatively, you can switch clusters via infra use command.

infra use example

Lastly, try running a command on the Kubernetes cluster:

kubectl get pods -A

By default, Infra will give view access to the user who made the install. To modify permissions or give additional access, use Infra dashboard or CLI.

Next steps

Congratulations. You've successfully connected your first cluster.

Infra works best when used with a team. Next, configure how users authenticate by connecting an identity provider, or add users directly by inviting them.