check-circle-line exclamation-circle-line close-line

<

This topic describes how to use the Tanzu Kubernetes Grid installer interface to deploy a management cluster to Amazon Elastic Compute Cloud (Amazon EC2). The Tanzu Kubernetes Grid installer interface guides you through the deployment of the management cluster, and provides different configurations for you to choose.

Prerequisites

Make sure that you have met the all of the requirements listed in Set Up Tanzu Kubernetes Grid and Prepare to Deploy the Management Cluster to Amazon EC2.

Procedure

The values that you set as environment variables in Prepare to Deploy the Management Cluster to Amazon EC2 are prepopulated in the relevant fields of the installer interface.

IMPORTANT:

Do not run multiple management cluster deployments on the same bootstrap environment machine at the same time. Do not change context or edit the kubeconfig file while Tanzu Kubernetes Grid operations are running.

Tanzu Kubernetes Grid does not support IPv6 addresses. This is because upstream Kubernetes only provides alpha support for IPv6. Always provide IPv4 addresses in the procedures in this topic.

  1. On the machine on which you downloaded and installed the Tanzu Kubernetes Grid CLI, run the tkg init command with the --ui option.

    tkg init --ui
    

    By default Tanzu Kubernetes Grid creates a folder called $HOME/.tkg and creates the cluster configuration file, config.yaml in that folder. To create config.yaml in a different location or with a different name, specify the --config option. If you specify the --config option, Tanzu Kubernetes Grid only creates the YAML file in the specified location. Other files are still created in the $HOME/.tkg folder.

    tkg init --ui --config=/path/my-config.yaml
    

    When you run the tkg init --ui command, it opens http://127.0.0.1:8080 in your default browser and displays the Tanzu Kubernetes Grid installer interface.

    Tanzu Kubernetes Grid installer interface welcome page with Deploy to AWS button

  2. Click the Deploy On AWS EC2 button.

  3. In the IaaS Provider section, enter the access key ID and secret access key for your Amazon EC2 account, and the name of an SSH key that is already registered with your Amazon EC2 account.
  4. Select the AWS region in which to deploy the management cluster and click Connect.
  5. If the connection is successful, click Next.

    Configure the connection to AWS

  6. In the VPC for AWS section, check that the pre-filled network ranges are available, check that the availability zone is set to the correct region, and click Next.

    If the recommended CIDR ranges are not available, enter new IP ranges in CIDR format for the management cluster to use. The recommended ranges are as follows:

    • VPC CIDR: 10.0.0.0/16
    • Public Node CIDR: 10.0.1.0/24
    • Private Node CIDR: 10.0.0.0/24
  7. In the Control Plane Settings section, select the Development or Production tile.

    • If you select Development, the installer deploys a single control plane node.
    • If you select Production, the installer deploys three control plane nodes.
  8. In either of the Development or Production tiles, use the Instance type drop-down menu to select the configuration for the control plane node VM or VMs.

    Select a small, medium, large, or xlarge AWS T3 instance for the control plane node VMs, depending on the expected workloads that you will run in the cluster. For information about the configuration of the different sizes of T3 instances, see Amazon EC2 Instance Types. The instance type that you select applies to the management cluster itself and to the Tanzu Kubernetes clusters that you deploy from it.

    Select the control plane node configuration

  9. Optionally enter a name for your management cluster and click Next.

    If you do not specify a name, Tanzu Kubernetes Grid generates one automatically.

  10. In the Kubernetes Network section, if recommended CIDR range of 100.96.0.0/11 for the Cluster Pod CIDR is unavailable, enter a different CIDR range to use for pods and click Next.

    Set the Kubernetes network

  11. Click Review Configuration to see the details of the management cluster that you have configured.

    Review the management cluster configuration

  12. (Optional) Click Edit Configuration to return to the installer wizard to modify your configuration.
  13. Click Deploy Management Cluster and follow the progress of the deployment of the management cluster in the installer interface.

    Deployment of the management cluster can take several minutes. The first run of tkg init takes longer than subsequent runs because it has to pull the required Docker images into the image store on your bootstrap environment. Subsequent runs do not require this step, so are faster. You can follow the progress of the deployment of the management cluster in the installer interface or in the terminal in which you ran tkg init --ui.

What to Do Next

For information about what happened during the deployment of the management cluster, how to connect kubectl to the management cluster, and how to create namespaces, see Examine the Management Cluster Deployment.