Adaptive Logo
Product
View Product
Use Cases
View Product
Resources
View Product
Pricing
Partners
Careers
General 1 min read

How to expose kind cluster over external IP

Debarshi BasakJul 20, 2023
How to expose kind cluster over external IP

This requires kind to be installed in the machine. If it is not installed, please follow this tutorial.

Following configuration allows you to expose kind cluster over an external IP.

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
  ipFamily: ipv6
  apiServerAddress: 0.0.0.0
  apiServerPort: 6443
nodes:
- role: control-plane
  kubeadmConfigPatches:
  - |
    kind: InitConfiguration
    nodeRegistration:
      kubeletExtraArgs:
        node-labels: "ingress-ready=true"
        authorization-mode: "AlwaysAllow"
  kubeadmConfigPatchesJSON6902:
  - group: kubeadm.k8s.io
    version: v1beta3
    kind: ClusterConfiguration
    patch: |
      - op: add
        path: /apiServer/certSANs/-
        value: <external-ip>

This configuration binds the port of kind cluster's API server to port 0.0.0.0:6443 and the certSans adds the external IP to the list of CNs.

Agents are the new perimeter. Contain the chaos.
No Network Changes Required
Cloud or On-Premises Deployment
Enterprise-Grade Security