CLI

Manage the glooctl command line interface (CLI) tool.

Quick installation

Install the latest version of glooctl. Make sure to add glooctl to your PATH (see macOS or Linux for specific instructions).

  • Linux and macOS:
    curl -sL https://run.solo.io/gloo/install | sh
    export PATH=$HOME/.gloo/bin:$PATH
  • Windows: Notes that this script requires OpenSSL.
    (New-Object System.Net.WebClient).DownloadString("https://run.solo.io/gloo/windows/install") | iex
    $env:Path += ";$env:userprofile/.gloo/bin/"

Install a specific version of the CLI

You can download a specific version of glooctl directly from the GitHub releases page.

  1. In your browser, navigate to the K8sGateway project releases.
  2. Choose the version of glooctl to install.
  3. Click the version of glooctl that you want to install.
  4. In the Assets, download the glooctl package that matches your operating system, and follow your operating system procedures for replacing your existing glooctl binary file with the upgraded version.
  5. After downloading, rename the executable to glooctl and add it to your system’s PATH.

Upgrade the CLI

When it’s time to upgrade K8sGateway, make sure to update the glooctl CLI version before upgrading.

You can use the glooctl upgrade command to upgrade or roll back the glooctl version. For example, you might change versions during an upgrade process, or when you have multiple versions of K8sGateway across clusters that you manage from the same workstation. For more options, run glooctl upgrade --help.

ℹ️
Upgrading the glooctl CLI does not upgrade the K8sGateway version that you run in your clusters.
  1. Set the version to upgrade glooctl to in an environment variable. Include the patch version.

    export CLI_VERSION=<version>
  2. Upgrade your version of glooctl.

    glooctl upgrade --release v${CLI_VERSION}
  3. Verify the glooctl CLI is installed and running the appropriate version. In the output, the Client is your local version. The Server is the version that runs in your cluster, and is undefined if K8sGateway is not installed yet.

    glooctl version -o table

Uninstall the CLI

To uninstall glooctl, you can delete the executable file from your system, such as on macOS in the following example.

rm ~/.gloo/bin/glooctl

Skew policy

Use the same version of the glooctl CLI as the K8sGateway version that you installed in your cluster.

  • Slight skews within minor versions typically work, such as glooctl 1.18.1 and K8sGateway 1.18.0.
  • Compatibility across beta versions is not guaranteed, even within minor version skews.
  • To resolve bugs in glooctl, you might have to upgrade the CLI to a specific or latest version.

Reference documentation

For more information about each glooctl command, see the CLI documentation or run the help flag for a command.

glooctl --help

Other command line tools

As you use K8sGateway, you might need the following common cluster management command line tools on your local system.

CLI tool Description
Cloud provider CLI The CLI to interact with your preferred cloud provider, such as aws or gcloud. You might also have local cluster testing tools such as kind or k3d. gcloud.
istioctl The Istio command line tool, if you plan to use the Istio integration in your K8sGateway environment. The guides in this documentation use Istio version 1.22.4. To check your installed version, run istioctl version.
helm The Kubernetes package manager, to customize multiple settings in a K8sGateway installation.
jq Parse JSON output, such as from logs, to get values that you can use in subsequent commands, environment variables, or other contexts.
kubectl The Kubernetes command line tool. Download the kubectl version that is within one minor version of the Kubernetes clusters you plan to use with K8sGateway.
openssl

ℹ️
The default openssl version that is included in macOS is LibreSSL, which does not work with these instructions. Make sure that you have the OpenSSL version of openssl, not LibreSSL.
The openssl version must be at least 1.1.

  1. Check your openssl version. If you see LibreSSL in the output, continue to the next step.
    openssl version
  2. Install the OpenSSL version (not LibreSSL). For example, you might use Homebrew.
    brew install openssl
  3. Review the output of the OpenSSL installation for the path of the binary file. You can choose to export the binary to your path, or call the entire path whenever the following steps use an openssl command.
    • For example, openssl might be installed along the following path: /usr/local/opt/openssl@3/bin/
    • To run commands, you can append the path so that your terminal uses this installed version of OpenSSL, and not the default LibreSSL. /usr/local/opt/openssl@3/bin/openssl req -new -newkey rsa:4096 -x509 -sha256 -days 3650...