Enable Kubectl Shell for AKS

Configure the kubectl shell for for DuploCloud-managed AKS deployments

Step 1. Create a DuploCloud Service

  1. From the Tenant list box, select the correct Tenant.

  2. Navigate to Kubernetes -> Services.

  3. Click Add. The Add Service page displays.

  4. Fill in the fields below. Leave any fields not listed at their default values.

Name

k8s-shell

Cloud

Azure

Platform

AKS Linux

Docker Image

duplocloud/shell:terraform-kubectl-latest

  1. 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
  1. Click Next, and then Create.

Step 2: Create a Load Balancer

  1. From the DuploCloud Portal, navigate to Kubernetes -> Services.

  2. From the NAME column, select the k8s-shell Service you created in the previous step.

  3. Select the Load Balancers tab, and click Configure Load Balancer.

  4. Fill in the fields below. Leave any fields not listed at their default values.

Type

K8S Cluster IP

Container port

80

Health Check

/duplo_auth

Backend Protocol

TCP

  1. Click Add.

Step 3: Add an Ingress

  1. In the DuploCloud Portal, navigate to Kubernetes -> Ingress.

  2. Click Add. The Add Ingress pane displays.

  3. Fill in the fields below. Leave any fields not listed at their default values.

Ingress name

K8s-shell

Ingress controller

azure-application-gateway

Visibility

Public

DNS Prefix

k8s-shell

Certificate

Select from the list box. If not present, you will need to configure a Certificate.

  1. In the Ingress Rules area Click Add Rule.

  2. Complete the following fields in the Add Ingress Rule pane. Leave any fields not listed at their default values.

Service Name

k8s-shell:80

Container port

80

  1. Click Add Rule.

  2. Enter the following in the Annotations field:

appgw.ingress.kubernetes.io/health-probe-path: /duplo_auth
  1. Click Submit.

  2. In the Name field, enter kubect-shell. Add a Path that defaults all traffic to the kubectl Service we created in the previous step:

Step 4: Add the DNS Name to System Settings

  1. Navigate to Administrator -> Systems Settings.

  2. Select the System Config tab, and click Add. The Add Config pane displays.

  3. 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

To find the DNS name, go to Kubernetes Services, select the k8s-shell Service, then select the Load Balancers tab. Click the name of the Load Balancer, and copy the DNS name from the DNS Name box.

  1. Click Submit. Access to the kubectl shell is enabled.

Last updated

Was this helpful?