Unable to select cluster when deploying a network function (NF)
search cancel

Unable to select cluster when deploying a network function (NF)

book

Article ID: 379612

calendar_today

Updated On:

Products

VMware Telco Cloud Automation

Issue/Introduction

When deploying an NF, the desired target cluster is greyed out and can't be selected.

The following error is returned to the UI:

Failed to create control plane CR. Cluster: <CLUSTER_NAME>, Operation: EditCluster, Intent: ########-####-####-####-############, Details: HttpStatus: 422 : admission webhook "kb.io - This is a premium name " denied the request: TcaKubeControlPlane.telco.vmware.com "<CLUSTER_NAME>" is invalid: spec.rolloutBefore: Invalid value: "rolloutBefore": cannot be modified

 

Environment

2.3

Cause

If there is a discrepancy between the running / desired configurations, and if one of those differences is an immutable field such as the rolloutBefore (pertaining to certificate renewals), the kube-apiserver will refuse the operation with a 422 HTTP code.

Resolution

  • Confirm the value of the running configuration:

kubectl get tkc -n <NAMESPACE> -o yaml

  • Confirm the value of the previous configuration by checking the 'lastAppliedConfig' in the TKC's annotations.
  • Pause the TKC operator to prevent reconciliations temporarily:

kubectl patch pkgi/tca-kubecluster-operator -n tca-system  -p '{"spec":{"paused":true}}' --type=merge

  • Backup the ValidatingWebhookConfiguration:

kubectl get ValidatingWebhookConfiguration tca-kubecluster-operator-validating-webhook-configuration -o yaml > webhook.yaml

  • Delete the ValidatingWebhookConfiguration:

kubectl delete ValidatingWebhookConfiguration tca-kubecluster-operator-validating-webhook-configuration

  • Perform a 'dummy edit' of the affected cluster to force the cluster to reconcile.
  • Once complete, unpause the TKC operator to recreate the ValidatingWebhookConfiguration and to resume normal cluster operations:

kubectl patch pkgi/tca-kubecluster-operator -n tca-system  -p '{"spec":{"paused":false}}' --type=merge