In VMware vSphere Foundation (VVF) and VMware Cloud Foundation (VCF) environments, service account credentials stored in SDDC-LCM Kubernetes secrets may become stale, causing workflow failures. This occurs in several scenarios:
[email protected] credentials instead of proper service accounts. If the administrator password is rotated out-of-band, the stored credentials become invalid.The issue arises from different credential management patterns across deployment types:
[email protected] credentials instead of dedicated service accounts, preventing normal rotation workflows from functioning correctly.The recovery tooling is split into two dedicated scripts, one per target service. Each script creates a new service account that replaces the stored credentials in SDDC-LCM. Both handle the following use cases:
The scripts do not handle the repair of a corrupted administrator account. Instead, as part of a validation step, each script validates the passed administrator credentials. If the credentials are invalid, an error message indicates this.
ReestablishVCServiceAccount.sh - Creates a vCenter service account with global Administrator permissions.ReestablishSddcManagerServiceAccount.sh - Creates an SDDC Manager service account with Admin role permissions.ReestablishVCServiceAccount.sh Workflowvcf-iam-vcenter-admin with updated service account username and passwordReestablishSddcManagerServiceAccount.sh Workflowvcf-iam-sddc-manager-admin with updated service account username and passwordReestablishVCServiceAccount.sh Parameters--vcenter-fqdn: Fully Qualified Domain Name of the vCenter Server. Required to establish a connection to vCenter for service account creation, permission assignment, SSL certificate extraction, and configuration validation. All vCenter operations depend on this endpoint.--vcenter-admin-username: Administrator username for vCenter authentication. Required to authenticate with vCenter for creating new service accounts and assigning global Administrator permissions. Must have sufficient privileges to create users and modify permissions.ReestablishSddcManagerServiceAccount.sh Parameters--sddc-manager-fqdn: Fully Qualified Domain Name of the SDDC Manager. Required to establish a connection to SDDC Manager for service account creation, role assignment, SSL certificate extraction, and configuration validation. All SDDC Manager operations depend on this endpoint.--sddc-manager-username: Administrator username for SDDC Manager authentication. Required to authenticate with SDDC Manager for creating new service accounts and assigning Admin role permissions. Must have sufficient privileges to create service accounts.This script creates new dedicated service accounts to replace stored administrator credentials, supporting both vCenter and SDDC Manager recovery scripts.
The script requires the following:
curl, openssl, jq, awk, base64, kubectlDownload the appropriate script attached to this case depending on the use case:
Steps to SSH to the VMSP control plane node:
Build > Lifecycle > Components tab.VCF Services Runtime link.vmware-system-user.sudo -i
export KUBECONFIG=/etc/kubernetes/admin.confEnsure that kubectl is working as expected and the SSH is connected to a Control Plane node by running the following command:
kubectl get nodes -o widekubectl command must complete successfully and return a list of nodes before continuing.Download the raw files onto the VMSP control plane node using wget and run the following commands or use vi to copy in the logic to the new file:
mkdir recovery_scripts
cd recovery_scripts
wget ...
chmod +x *.shRun the recovery script for the given use case. The script prompts for the target service admin password and prompts to confirm the SSL thumbprint as needed.
./ReestablishVCServiceAccount.sh \
--vcenter-fqdn '<VCENTER_FQDN>' \
--vcenter-admin-username '[email protected]'./ReestablishSddcManagerServiceAccount.sh \
--sddc-manager-fqdn '<SDDC_MANAGER_FQDN>' \
--sddc-manager-username '[email protected]'