How to change the Workload CIDR in Data Services Manager
search cancel

How to change the Workload CIDR in Data Services Manager

book

Article ID: 379263

calendar_today

Updated On:

Products

VMware Data Services Manager

Issue/Introduction

This article outlines the steps required to change the Workload CIDR on DSM

Environment

VCF Data Services Manager version 2.1.2 or higher.

Resolution

1. Create an Admin User.

2. Download kubeconfig using one of the following 2 options:

  • Navigate to vCenter > Configure > Infrastructure Policy > Click on "DOWNLOAD DSM API KUBECONFIG"

Or

  • Execute the following script to receive a kubeconfig ('DSM-IP' and  email/password need to be changed):

export DSMADMINAUTHDR=$(curl -k \
-d '{"email":"[email protected]", "password":"VMware1!"}' \
-H "Content-Type: application/json" -X POST \
-i -s \
https://<DSM-IP>/provider/session | grep "Authorization: Bearer ")

curl -k -s \
-H "$DSMADMINAUTHDR" \
-H 'Accept: application/vnd.vmware.dms-v1+octet-stream' \
https://<DSM-IP>/provider/gateway-kubeconfig > dsm-admin.kubeconfig

export KUBECONFIG=dsm-admin.kubeconfig

3. Execute the following kubectl command to change the Workload network CIDR:

kubectl patch dsmsystemconfigs dsm-system-config --type='merge' -p '{"spec":{"workloadNetworkCidr":"XXX.XX.X.X/16"}}' --kubeconfig="dsm-admin.kubeconfig"

 

4. Validate the Workload CIDR changed with the following command:


kubectl get dsmsystemconfigs dsm-system-config --kubeconfig="dsm-admin.kubeconfig" -o yaml 
spec:
  ceipConsent: true
  dnsServers:
  - xx.x.x.x
  dsmProviderId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx
  externalLogDestination:
    enabled: false
    trustBundle: {}
  gateway: xx.xx.xx.x
  ip: xx.xx.xx.xx
  netmask: 255.255.255.0
  ntpServers:
  - xx.x.x.x
  workloadNetworkCidr: xxx.xx.x.x/16