Update DNS in a full TKGi with NSX environment
search cancel

Update DNS in a full TKGi with NSX environment

book

Article ID: 388507

calendar_today

Updated On:

Products

VMware Tanzu Kubernetes Grid Integrated Edition

Issue/Introduction

This article describes how to update/replace/change the DNS in a full TKGi environment with NSX, including Bosh Director tile and OpsMan VM.

Environment

TKGi with NSX

Resolution

  1. Update "Nodes DNS" field in the TKGi tile in OpsMan (Nodes DNS - Installing Tanzu Kubernetes Grid Integrated Edition on vSphere with VMware NSX)

    TKGi tile > Networking > Nodes DNS (each IP separated by a comma)

  2. Update the "DNS" entry in Bosh Director tile in OpsMan (Create Networks pane - Configuring BOSH Director on vSphere)

    Bosh Director tile > Create Networks > expand each configured Network and update the DNS field (each IP separated by a comma)

  3. Apply changes in OpsMan and select the "Upgrade all clusters" errand.

 

The above steps will not inject the new DNS configuration to existing TKGi clusters. If you have existing TKGi clusters, then you'll need to apply/update network-profiles with the new DNS entries:

  1. Create/update a network-profile with the "nodes_dns" field: Specify Nodes DNS Servers 

  2. Update the existing TKGi clusters with the new/updated network-profile (Creating and Managing Network Profiles (NSX Only)):

    # tkgi update-cluster <cluster-name> --network-profile <network-profile-name>

If you want to verify that the new DNS settings have been correctly propagated to your clusters, you can do:

  1. # bosh configs

  2. # bosh config <config-id associated to the TKGi cluster>

    You should see something like:

    $ bosh config 40
    Using environment '172.***' as client 'ops_manager'

    ID          40
    Type        cloud
    Name        service-instance_***
    Created At  2025-02-17 11:23:19 UTC
    Content     networks:
                - name: pks-***
                  type: manual
                  subnets:
                  - range: 172.***/24
                    gateway: 172.***
                    dns:
                    - 192.***
                    - 8.8.8.8
                    azs:
                    - az1
                    cloud_properties:
                      name: pks-***
                vm_extensions:
                - name: service-instance-***
                  cloud_properties: {}


    1 config

    Succeeded

The above changes will cause a rollout of new nodes in your clusters, both when applying changes in OpsMan and when updating the existing clusters with the "tkgi update-cluster" command.

To update the DNS entries in the OpsMan VM, from vCenter:

  1. Power off the OpsMan VM
  2. Got to Configure > vApp Options
  3. Select DNS and Set Value to the new IP addresses
  4. Power on the OpsMan VM


Note: To update the DNS in NSX, please open a Support Request with the NSX team to get proper guidance.