VMware vCenter
VMware vSphere Kubernetes Service
VMware NSX
This is due to a small gap between vCenter and NSX: When a jobs are run on the Supervisor Cluster - which are created as vSphere Pods -, a corresponding available MAC address (with prefix 04:50:56:) is allocated from NSX Manager. When said pod shuts down and enters the Completed state, it cannot be started anymore and hence the reserved MAC address is freed from NSX Manager's available MAC address pool.
As such one-off pods remains on the environment by default and are still known to and registered in vCenter, any new workload using the previously freed MAC address will cause vCenter to detect a duplicate MAC address. Because however such pods cannot be started anymore, there is no "real" duplicate MAC address issue present on the network.
Solution
This is a false-positive alert. Engineering is looking to improve this in the future.
Workaround
Finished jobs are not deleted as per Kubernetes default. To reduce likelihood of entities using the same MAC address from vCenter's perspective, finished jobs can be changed to be automatically deleted. For this, the setting .spec.ttlSecondsAfterFinished can be configured. (For more information, please refer to the Kubernetes documentation at https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/)
If needed it is possible to check for any duplicate MAC address assignments on NSX Manager, by either utilizing the log bundle or querying the NSX API.
# cat ./nsx_manager_[UUID].tar_extracted/desired_state_manager.json | jq -r '."/nsxapi/api/v1/logical-ports"' > logicalports.json# curl -k -X GET -u "admin:<NSX-PASSWORD>" https://localhost/api/v1/logical-ports > logicalports.json# grep -o '"mac_address"\s*:\s*"[^"]*"' logicalports.json | cut -d'"' -f4 | sort | uniq -d04:50:56:##:##:##