Skip to content

Pyahu Cloud access

Terminal window
pyahu login
pyahu kube list

login opens the identity provider in your browser using the device authorization flow. Approve the displayed code there. The session is stored in ~/.pyahu/credentials.json. An organization admin must enable kubectl access for the environment in the Cloud console. The returned access level determines what Kubernetes permits in that namespace.

Terminal window
pyahu kube config --env production
kubectl config current-context
kubectl get pods

Use the exact environment name from pyahu kube list. --env is optional only when one environment is available. Duplicate names across organizations are rejected.

This command changes the current kubectl context. Check the selected context before running a command. It backs up the kubeconfig and preserves other entries. If KUBECONFIG contains several paths, only the first is written; otherwise it uses ~/.kube/config. The kubeconfig contains an exec plugin, not a permanent token. kubectl invokes pyahu kube credentials to obtain a short-lived credential; do not run that plugin by hand.

pyahu kubeconfig prints the path for the local k3d stack. Cloud access uses pyahu kube config. The local lifecycle commands operate on the stack in pyahu.yaml.

Terminal window
pyahu kube doctor
pyahu kube list --output json
pyahu logout

kube doctor reports the console, issuer, session and accessible environments. Its report is diagnostic: read the values rather than treating exit zero as proof of Kubernetes connectivity. logout removes the stored session; context entries remain.

The defaults target Pyahu Cloud. Custom installations can set PYAHU_CONSOLE_URL, PYAHU_ISSUER and PYAHU_CLIENT_ID; verify these against your installation.