Skip to content

[Feature] P2S VPNGateway support for flexnode#68

Open
wenxuan0923 wants to merge 1 commit intomainfrom
wenx/vpn-gateway
Open

[Feature] P2S VPNGateway support for flexnode#68
wenxuan0923 wants to merge 1 commit intomainfrom
wenx/vpn-gateway

Conversation

@wenxuan0923
Copy link
Collaborator

@wenxuan0923 wenxuan0923 commented Feb 6, 2026

Pod networking needs IP reachability between nodes. This PR added a comprehensive VPN Gateway component enabling secure pod-to-pod communication between AKS clusters and AKS Flex nodes through Point-to-Site VPN connections.

Details

  • VPN Gateway provisioning: Automated Azure VPN Gateway creation with P2S configuration
  • Certificate management: Self-generated root CA and client certificates for authentication
  • OpenVPN integration: Automatic client configuration and systemd service management
  • Network setup: Route and iptables configuration for seamless pod connectivity
  • Graceful cleanup: Robust uninstaller with file, network, and Azure resource cleanup

New sample config for enabling VPN gateway for flex node -> AKS node communication:

{
  "azure": {
    "subscriptionId": "xxxxxxxxxxxxxx",
    "tenantId": "xxxxxxxxxxxxxx",
    "cloud": "AzurePublicCloud",
    "vpnGateway": {
      "enabled": true,
      "p2sGatewayCIDR": "192.168.100.0/24",
      "podCIDR": "172.16.0.0/16",
      "vnetID": "/subscriptions/xxxxxxxxxxxxxx/resourceGroups/MC_wenx-rg_wenx-edge-cluster_eastus/providers/Microsoft.Network/virtualNetworks/aks-vnet-xxxxx"
    },
    "arc": {
      "enabled": true,
      "machineName": "edge-node",
      "tags": {
        "node-type": "edge"
      },
      "resourceGroup": "wenx-rg",
      "location": "eastus"
    },
    "targetCluster": {
      "resourceId": "/subscriptions/xxxxxxxxxxxxxx/resourceGroups/wenx-rg/providers/Microsoft.ContainerService/managedClusters/wenx-edge-cluster",
      "location": "eastus"
    }
  },
  "kubernetes": {
    "version": "1.32.7"
  },
  "agent": {
    "logLevel": "info",
    "logDir": "/var/log/aks-flex-node"
  }
}

Then on top of that, user can use cilium for pod networking.

helm install cilium cilium/cilium \
  --version 1.16.5 \
  --namespace kube-system \
  --set operator.replicas=1 \
  --set routingMode=tunnel \
  --set tunnelProtocol=vxlan \
  --set mtu=1350 \
  --set ipam.mode=cluster-pool \
  --set ipam.operator.clusterPoolIPv4PodCIDRList="{172.16.0.0/16}" \
  --set bpf.masquerade=true \
  --set bpf.hostLegacyRouting=false \
  --set kubeProxyReplacement=true \
  --wait

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant