Skip to content
/ infra Public

Infra provides authentication and access management to servers and Kubernetes clusters.

License

Notifications You must be signed in to change notification settings

infrahq/infra

Repository files navigation

logo

Infra provides authentication and access management to servers, clusters, and databases.

Getting Started

macOS

brew install infrahq/tap/infra

Windows

scoop bucket add infrahq https://github.com/infrahq/scoop.git
scoop install infra

Linux

Download the latest packages from GitHub and install it with dpkg, apt, rpm, or dnf.

sudo dpkg -i infra_*.deb

sudo apt install ./infra_*.deb

sudo rpm -i infra-*.rpm

sudo dnf install infra-*.rpm

Create an access key

Log in to Infra. If you don't have a self-hosted Infra configured, you can sign up for a free Infra instance to get started.

Set the INFRA_SERVER variable to your Infra URL:

export INFRA_SERVER=<org>.infrahq.com
infra login

You'll be prompted for the Infra URL you created when you signed up. (e.g. <org>.infrahq.com).

Then, create an access key:

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

Connect Kubernetes 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.server.url=$INFRA_SERVER --set config.accessKey=$INFRA_ACCESS_KEY --set config.name=example

Access your cluster

Give yourself permission to access the cluster:

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

Use infra list to verify access.

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

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.

Community

  • Community Forum Best for: help with building, discussion about infrastructure access best practices.
  • GitHub Issues Best for: bugs and errors you encounter using Infra.