Configure kubectl for the Hub
Overview
This page configures a kubectl context named hub that talks to the Upbound
Platform Hub. The Hub serves a Kubernetes-style API, so once you configure
kubectl, standard commands like get and describe work with Hub resources
like controlplanes, spaces, and resources.
Prerequisites
- The Hub's API URL, such as
https://<hub-host>. If the Hub isn't served with a publicly trusted certificate, you also need its CA certificate. - An identity in an OIDC provider registered with the Hub, for interactive login. For machine or CI environments, provide an IdP-issued JWT instead, covered under Log in to the Hub.
- kubectl installed.
Step 1: Install hub-credential-helper
hub-credential-helper is a CLI that authenticates you to the Hub. It runs the
device-authorization and token-exchange flows to get a Hub token, caches it, and
refreshes it as it expires.
Download the binary for your platform:
- Auto-detect
- macOS (Apple Silicon)
- macOS (Intel)
- Linux (x86_64)
- Linux (ARM64)
os=$(uname -s | tr '[:upper:]' '[:lower:]')
arch=$(uname -m)
case "$arch" in
x86_64) arch=amd64 ;;
aarch64) arch=arm64 ;;
esac
curl -fsSLo hub-credential-helper \
"https://storage.googleapis.com/upbound-hub-artifacts/main/current/bin/${os}_${arch}/hub-credential-helper"
chmod +x hub-credential-helper
sudo mv hub-credential-helper /usr/local/bin/
curl -fsSLo hub-credential-helper \
"https://storage.googleapis.com/upbound-hub-artifacts/main/current/bin/darwin_arm64/hub-credential-helper"
chmod +x hub-credential-helper
sudo mv hub-credential-helper /usr/local/bin/
curl -fsSLo hub-credential-helper \
"https://storage.googleapis.com/upbound-hub-artifacts/main/current/bin/darwin_amd64/hub-credential-helper"
chmod +x hub-credential-helper
sudo mv hub-credential-helper /usr/local/bin/
curl -fsSLo hub-credential-helper \
"https://storage.googleapis.com/upbound-hub-artifacts/main/current/bin/linux_amd64/hub-credential-helper"
chmod +x hub-credential-helper
sudo mv hub-credential-helper /usr/local/bin/
curl -fsSLo hub-credential-helper \
"https://storage.googleapis.com/upbound-hub-artifacts/main/current/bin/linux_arm64/hub-credential-helper"
chmod +x hub-credential-helper
sudo mv hub-credential-helper /usr/local/bin/
Verify the install:
hub-credential-helper --help
hub-credential-helper --help also documents the full flag set, environment
variables, and token-resolution order.