This page explains how to set up your environment to prepare for installing Anthos Service Mesh.
For installations on Google Kubernetes Engine, you can follow the installation guides using Cloud Shell, an in-browser command line interface to your Google Cloud resources, or your own computer running Linux or macOS.
Use Cloud Shell
Cloud Shell provisions a g1-small Compute Engine virtual machine (VM) running a Debian-based Linux operating system. The advantages to using Cloud Shell are:
Cloud Shell includes the
gcloud
,kubectl
andkpt
command-line tools that you need.Your Cloud Shell $HOME directory has 5GB persistent storage space.
You have your choice of text editors:
Code editor, which you access by clicking at the top of the Cloud Shell window.
Emacs, Vim, or Nano, which you access from the command line in Cloud Shell.
To use Cloud Shell:
- Go to the Google Cloud console.
- Select your Cloud project.
Click the Activate Cloud Shell button at the top of the Google Cloud console window.
A Cloud Shell session opens inside a new frame at the bottom of the Google Cloud console and displays a command-line prompt.
Update the components:
gcloud components update
The command responds with output similar to the following:
ERROR: (gcloud.components.update) You cannot perform this action because the gcloud CLI component manager is disabled for this installation. You can run the following command to achieve the same result for this installation: sudo apt-get update && sudo apt-get --only-upgrade install ...
Copy the long command and paste it to update the components.
Verify
kpt
version. Ensure you are running a pre 1.x version of kpt:kpt version
The output should be similar to the following:
0.39.2
If you have
kpt
version 1.x or higher, download the required version:curl -L https://github.com/GoogleContainerTools/kpt/releases/download/v0.39.2/kpt_linux_amd64 > kpt_0_39_2 chmod +x kpt_0_39_2 alias kpt="$(readlink -f kpt_0_39_2)"
Use Linux
On your local machine, install and initialize the gcloud CLI.
If you already have the gcloud CLI installed:
Authenticate with the Google Cloud CLI:
gcloud auth login
Update the components:
gcloud components update
Install
kubectl
:gcloud components install kubectl
Install the required version of
kpt
:curl -L https://github.com/GoogleContainerTools/kpt/releases/download/v0.39.2/kpt_linux_amd64 > kpt_0_39_2 chmod +x kpt_0_39_2 alias kpt="$(readlink -f kpt_0_39_2)"
Make sure that Git is in your path so that
kpt
can find it.
Use MacOS
On your local machine, install and initialize the gcloud CLI.
If you already have the gcloud CLI installed:
Authenticate with the Google Cloud CLI:
gcloud auth login
Update the components:
gcloud components update
Install
kubectl
:gcloud components install kubectl
Install the required version of
kpt
:# For non-M1 chip Macs curl -L https://github.com/GoogleContainerTools/kpt/releases/download/v0.39.2/kpt_darwin_amd64 > kpt_0_39_2 # For M1 chip Macs curl -L https://github.com/GoogleContainerTools/kpt/releases/download/v0.39.2/kpt_darwin_arm64 > kpt_0_39_2 chmod +x kpt_0_39_2 alias kpt="$(readlink -f kpt_0_39_2)"
Make sure that Git is in your path so that
kpt
can find it.
What's next
The next steps depend on your use case:
For new installations and migrations from Istio, see Setting up your project.
To upgrade, see Upgrade Anthos Service Mesh.