GKE (Google Kubernetes Engine)
Connecting to GCP Kubernetes Engine from a DevZero workspace.
Architecture Diagram
Prerequisites
- Follow Connecting to GCP guide.
Existing GKE Cluster
Step 1: Accessing GKE Cluster from a DevBox
- Go to your DevBox and install Gcloud SDK:
- Authenticate your GCP account with Gcloud SDK:
- Download the kubectl binaries:
- Install kubectl:
- Connect to the cluster:
- Check if the cluster is accessible:
New GKE Cluster
Step 1: Creating a GKE Cluster
- Go to Kubernetes Engine > Kubernetes Cluster > Create.
- Select the standard Cluster, enter the name of the cluster and assign a Regional location where your Private Subnet is located.
- Click on Next. In the Node Pool > Default Pool > Nodes > Configure node settings section, choose the desired Machine Configuration for the nodes.
- Go to Cluster > Networking and select the Network VPC along with the Private Subnet for the cluster. Choose Private cluster in the IPv4 network access and uncheck the Access control plane using its external IP address checkbox.
- Enter a desired Default pod address range and service address range. Here we have taken 192.168.0.0/16 and 192.169.0.0/16 for pod address range and service address range repectively.
- Enter the Bastion Host's CIDR Range in the Authorized Networks section.
- Click on Create.
Step 2: Installing the necessary tools
- Go to your DevBox and install Gcloud SDK:
- Authenticate your GCP account with Gcloud SDK:
- Download kubectl binaries:
- Install kubectl:
Step 3: Accessing the GKE Cluster
- Connect to the cluster:
- Check if the cluster is accessible: