- To change the name of the cluster we need to use the helm values.
- We can run the following command to recreate all the pods with a new name
helm upgrade --recreate-pods mw-agent middleware-labs/mw-kube-agent-v2 --set mw.apiKey=xxxxx --set mw.target=https://xxx.middleware.io:443 --set clusterMetadata.name="api-backend"
- Here mw.apiKey is the API key of the middleware agent, mw.target is the target endpoint of the middleware agent, clusterMetadata.name is the name of the cluster.
- Wait for 2-3 min and your cluster name will be updated.
For more information regarding the installation of middleware agent on kubernetes see the documentation. Kubernetes