Back to articles

Connect and Secure VKS Cluster Applications using Antrea and NSX

Learn how to securely connect and manage applications in VKS clusters using Antrea and VMware NSX. This guide covers architecture, networking, antrea traceflow, and real-world benefits for modern Kubernetes environments.

February 15, 2026Updated Jun 25, 2026690 words
Connect and Secure VKS Cluster Applications using Antrea and NSX

Introduction

Modern applications running on VKS (vSphere Kubernetes Service) demand:

  • Secure communication between microservices
  • Seamless connectivity across clusters, VMs, and external services
  • Centralized and scalable security policies

This is where the integration of Antrea and VMware NSX becomes powerful.

  • Antrea → Kubernetes-native networking (CNI)
  • NSX → Enterprise-grade networking and security platform

Together, they deliver:

  • Unified networking across Pods and VMs
  • Centralized security policy enforcement
  • Deep visibility and troubleshooting capabilities

Antrea acts as the data plane, while NSX provides control, policy, and visibility.


Architecture Overview

Antrea_NSX.png

Key Components

ComponentDescription
NSX ManagerCentral control plane for networking & security
Antrea NSX AdapterBridge between Antrea and NSX
Antrea CNIProvides Kubernetes pod networking
Antrea ControllerManages networking and policies

How Antrea + NSX Connect VKS Applications

Installation Prerequisites for Configuring using Antrea Addon Config

To provision VKS clusters with Antrea Addonconfig, your environment must meet the following requirements:

  • VKS version 3.6 or later
  • VKr version 1.35 or later

Note : Registering VKS Cluster with NSX is supported with earlier VKr and VKS releases as well using AntreaConfig CR. Please refer the official guide for more details.

Bill of Materials (BOM) used in Demo

  • VKS 3.6.2
  • VKr 1.35.2
  • VCF 9.0.1

Antrea NSX Integration Workflow

In this example my VKS Cluster name is vks-cluster-with-nsx and VKS Cluster supervisor namespace name is vks-cluster-namespace, refer attached yaml for reference.

Step1 : Create a file named antrea_addon_config.yaml with the following content.

text
apiVersion: addons.kubernetes.vmware.com/v1alpha1
kind: AddonConfig
metadata:
  name: <vks-cluster-name>-antrea
  namespace: <vks-cluster-namespace>
spec:
  values:
    antreaNSX:    # Key to Register Antrea with NSX
      enable: true
text
# Run following command on Supervisor Context

# kubectl apply -f antrea_addon_config.yaml
addonconfig.addons.kubernetes.vmware.com/vks-cluster-with-nsx-antrea created

Step2 : Create a file named nsx_registered_vks.yaml with the following content.

text
apiVersion: cluster.x-k8s.io/v1beta2
kind: Cluster
metadata:
  name: <vks-cluster-name>
  namespace: <vks-cluster-namespace>
spec:
  clusterNetwork:
    pods:
      cidrBlocks:
        - 192.0.2.0/16
    serviceDomain: cluster.local
    services:
      cidrBlocks:
        - 198.51.100.0/12
  topology:
    classRef:
      name: builtin-generic-v3.6.0
      namespace: vmware-system-vks-public
    controlPlane:
      metadata:
        annotations:
          run.tanzu.vmware.com/resolve-os-image: os-name=photon
      replicas: 3  
    variables:
      - name: vmClass
        value: <vm_class_name>
      - name: storageClass
        value: <storage_class_name> # (kubectl get sc) 
      - name: kubernetes
        value:
          etcdConfiguration:
            maximumDBSizeGiB: 4
    version: v1.35.2---vmware.1-vkr.3
    workers:
      machineDeployments:
        - class: node-pool
          metadata:
            annotations:
              run.tanzu.vmware.com/resolve-os-image: os-name=photon
          name: photon-worker-node
          replicas: 3
          variables:
            overrides:
              - name: vmClass
                value: <vm_class_name>
              - name: volumes
                value:
                  - name: kubelet-dir
                    mountPath: /var/lib/kubelet
                    capacity: 5Gi
                    storageClass: <storage_class_name>
                  - name: containerd-dir
                    mountPath: /var/lib/containerd
                    capacity: 20Gi
                    storageClass: <storage_class_name>
text
# Run following command on Supervisor Context

# kubectl apply -f nsx_registered_vks.yaml
cluster.cluster.x-k8s.io/vks-cluster-with-nsx created

Validate VKS Cluster is created successfully and running fine with desired replicas of Control Plane and Worker Nodes.

text
# Run following command on Supervisor Context

# kubectl get cluster -A | grep -i vks-cluster-with-nsx
NAMESPACE                          NAME                                  CLUSTERCLASS             AVAILABLE   CP DESIRED   CP AVAILABLE   CP UP-TO-DATE   W DESIRED   W AVAILABLE   W UP-TO-DATE   PHASE         AGE    VERSION        
vks-cluster-namespace              vks-cluster-with-nsx                  builtin-generic-v3.6.0     True        3            3              3               3           3             3            Provisioned   34m    v1.35.2+vmware.1

Validation Workflow in NSX

In the NSX Manager UI navigate to the System -> Fabric -> Nodes -> Container Clusters -> Antrea and verify your Antrea Cluster.

1.png

Navigate to Inventory -> Containers -> Clusters and verify VKS Cluster Objects Inventory like Nodes, Pods, Services.

2.png

Navigate to Plan & Troubleshoot -> Traffic Analysis and Run a trace between Pods/Services running within the Antrea Container Cluster

Screenshot 2026-04-17 at 6.06.44 PM.png

Trace Ouput

Screenshot 2026-04-17 at 6.09.46 PM.png

Request Antrea Agent Support Bundle Collection in NSX (System -> Support Bundle -> Request Bundle)

3.png

Disclaimer

This blog is for informational and educational purposes only. The configurations, examples, and architectural guidance provided are based on general best practices and publicly available references.

Always validate configurations in a non-production environment before applying them to live systems. Features and integrations may vary depending on the versions of VKS, VKr, LCI, Supervisor and vCenter Server being used. The author is not responsible for any unintended impact caused by the use of this information in production environments.

Contents, and opinions are my own and do not reflect the opinions of my employer.

Practice Lab
nsx
antrea
vks
addon

How did you find this article?

Share:
974 views 0 claps 0 comments

Responses (0)

Sign in to join the conversation.

No responses yet. Be the first to share your thoughts!