Install Anthos Service Mesh offline

Problem

You need to install Anthos Service Mesh on servers without public internet access.

Environment

  • Google Kubernetes Engine cluster
  • Environment without public internet access

Solution

The command '--offline --output_dir $OUTPUT_DIR' forces the use of a local directory for installation. In the above example the $OUTPUT_DIR are asm-packages.

  1. Download asmcli on an instance with internet access.
  2. Build the installation components on the server with internet access with the following command:
    asmcli build-offline-package --output_dir $OUTPUT_DIR
  3. Copy the asmcli folder and the $OUTPUT_DIR to the server without internet access.
  4. Install ASM on the server without internet access. Follow the documentation for unmanaged or managed ASM install:
    asmcli install --offline --output_dir $OUTPUT_DIR ....(all other flags like --managed --enable-all)
    
    eg .asmcli install \
    
      --offline \
    
      --verbose \
    
      --project_id ${PROJECT_ID} \
    
      --cluster_name ${CLUSTER_NAME} \
    
      --cluster_location ${CLUSTER_LOCATION} \
    
      --mode install \
    
      --ca mesh_ca \
    
      --output_dir asm-packages \
    
      --enable_registration \
    
      --enable_all  
  5. Anthos Service Mesh gives you the option to deploy and manage gateways as part of your service mesh. Deploy such as needed.

Cause

The Anthos Service Mesh (ASM) installation by default requires users to download asmcli from GitHub and then use the command to install ASM. However, the customer's production environment does not allow internet access. Customer needs a solution to install ASM offline.