Prerequisites
Before you start with Syself Autopilot, you should install the necessary tools to interact with Kubernetes clusters. This section provides instruction on how to install kubectl and kubelogin. Make sure you have these tools installed before proceeding to the next sections.
- kubectl sends commands to Kubernetes clusters. Every step here uses it.
- kubelogin handles the browser-based login to the Syself management cluster.
kubectlcalls it for you; you never run it yourself.
Install kubectl#
kubectl is the Kubernetes command-line tool. You use it to create, inspect, and update everything in a cluster, from apps to servers.
$ curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
$ sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
$ curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl"
$ sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
Note
If you do not have root access, install kubectl to your home directory instead:
$ chmod +x kubectl
$ mkdir -p ~/.local/bin
$ mv ./kubectl ~/.local/bin/kubectl
# Make sure ~/.local/bin is in your $PATH
$ curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl"
$ chmod +x ./kubectl
$ sudo mv ./kubectl /usr/local/bin/kubectl
$ sudo chown root: /usr/local/bin/kubectl
$ curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/arm64/kubectl"
$ chmod +x ./kubectl
$ sudo mv ./kubectl /usr/local/bin/kubectl
$ sudo chown root: /usr/local/bin/kubectl
$ curl.exe -LO "https://dl.k8s.io/release/$(curl.exe -L -s https://dl.k8s.io/release/stable.txt)/bin/windows/amd64/kubectl.exe"
For more options and package-manager install methods, see the official kubectl documentation.
Install kubelogin#
kubelogin (also called oidc-login) is a kubectl plugin. The management cluster authenticates you with OpenID Connect (OIDC), the same standard behind most "log in with your identity provider" buttons: you log in through your browser instead of pasting a static token. kubelogin runs that browser flow whenever kubectl needs a fresh login.
The recommended way to install it is with Krew, the kubectl plugin manager.
Install Krew#
Krew installs and updates kubectl plugins.
Make sure git is installed.
Run this command to download and install Krew:
bash ( set -x; cd "$(mktemp -d)" && OS="$(uname | tr '[:upper:]' '[:lower:]')" && ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" && KREW="krew-${OS}_${ARCH}" && curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" && tar zxvf "${KREW}.tar.gz" && ./"${KREW}" install krew )Add Krew to your PATH. Add this line to
~/.bashrcor~/.zshrc:bash export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"Then restart your shell.
Warning
Running
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"only in your current terminal session means you lose it when you close the window. Add the line to your shell configuration file so it persists.
Check the install:
$ kubectl krew version
The command prints Krew's version details. If your shell reports unknown command "krew", the PATH line from step 3 is not active yet; restart your shell and try again.
For Windows instructions, see the Krew documentation.
Install kubelogin#
$ kubectl krew install oidc-login
$ choco install kubelogin
If you prefer to install from a GitHub release, download the binary and place it on your PATH as kubectl-oidc_login.
Verify#
Check that both tools are available:
$ kubectl version --client
$ kubectl oidc-login --version
Both commands print a version number and exit without an error. That is all the setup you need for now; you do not need a running cluster yet.
If kubectl oidc-login --version fails with an unknown-command error, kubectl cannot find the plugin. Recheck the Krew PATH line from the Install Krew step.
Next step#
Connect to the management cluster: Access the management cluster .
Related#
Intro to Syself Autopilot
Syself Autopilot is fully managed Kubernetes on your own Hetzner servers. You declare one object; Syself builds, heals, and upgrades the cluster on standard upstream Kubernetes.
Accessing the management cluster
Learn how to access our management cluster to create, update, and scale your Kubernetes clusters with Syself Autopilot.