Enable Kubectl Shell for GKE
Configure the kubectl shell for for DuploCloud-managed GKE deployments
Enabling kubectl
shell access in GCP is part of a one-time DuploCloud Portal setup process.
Prerequisite
Ensure a Node Pool Exists: Before creating the k8s-shell
service, make sure that your GKE tenant has at least one node pool.
To check:
Go to Kubernetes → Nodes in the DuploCloud Portal.
If no nodes are listed, navigate to Kubernetes → Node Pools and click Add to create a new node pool.
Choose an appropriate Instance Type and Node Count (you can scale it down later).
Submit and wait for the nodes to become active.
Once a node pool is available, proceed to create the shell service.
Step 1. Create a DuploCloud Service
From the Tenant list box, select the correct Tenant.
Navigate to Kubernetes -> Services.
Click Add. The Add Service page displays.
Fill in the fields below. Leave any fields not listed at their default values.
Name
k8s-shell
Cloud
Google
Platform
GKE Linux
Docker Image
duplocloud/shell:terraform-kubectl-latest
Enter the following in the Environmental Variables field:
- Name: FLASK_APP_SECRET
Value: b33d13ab-5b46-443d-a19d-asdfsd443
- Name: DUPLO_AUTH_URL
Value: https://<CUSTOMER_NAME>.duplocloud.net
Click Next, and then Create.
Step 2: Create a Load Balancer
From the DuploCloud Portal, navigate to Kubernetes -> Services.
From the NAME column, select the
k8s-shell
Service you created in the previous step.Select the Load Balancers tab, and click Configure Load Balancer.
Fill in the fields below. Leave any fields not listed at their default values.
Type
Application LB
Container port
80
Health Check
/duplo_auth
Certificate
Select your certificate from the list box. If none are present, you will need to configure a certificate.
External port
443
Visibility
Public
Application mode
Docker mode
Health Check
/duplo_auth
Backend Protocol
http
Click Add.
Step 3: Add the DNS Name to System Settings
Navigate to Administrator -> Systems Settings.
Select the System Config tab, and click Add. The Add Config pane displays.
Fill in the fields below.
Config Type
AppConfig
Key
Other
Key
DuploShellFqdn
Value
Paste the fully qualified DNS name* of your kubectl shell ingress/Load Balancer.
Example: https://k8s-shell.example.duplocloud.net
Click Submit. Access to the
kubectl
shell is enabled.
Last updated
Was this helpful?