Skip to main content

Prerequisites

Inspect 1.36

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. kubectl calls 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.

x86-64
		$ 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
	
ARM64
		$ 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
	

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.

  1. Make sure git is installed.

  2. 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
    )
    	
  3. Add Krew to your PATH. Add this line to ~/.bashrc or ~/.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#

macOS, Linux, Windows, and ARM
		$ kubectl krew install oidc-login
	

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: .