Setting up your environment

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.

Option A: 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 and helm 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:

  1. Go to the Google Cloud console.
  2. Select your Google Cloud project.
  3. Click the Activate Cloud Shell button at the top of the Google Cloud console window.

    Google Cloud Platform console

    A Cloud Shell session opens inside a new frame at the bottom of the Google Cloud console and displays a command-line prompt.

    Cloud Shell session

  4. 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 ...
  5. Copy the long command and paste it to update the components.

  6. Make sure that Git is in your path so that kpt can find it.

Option B: Use command-line tools locally

On your local machine, install and initialize the gcloud CLI.

If you already have the gcloud CLI installed:

  1. Authenticate with the gcloud CLI:

    gcloud auth login
  2. Update the components:

    gcloud components update
  3. Install kubectl:

    gcloud components install kubectl
  4. Install kpt:

    gcloud components install kpt
  5. Make sure that Git is in your path so that kpt can find it.