Attempting to create a Kubernetes Cluster using Container Server Extension 4.0 fails with the following error.
Name: ScriptExecutionError
Type: Error
Time: Wed Jan 20 2023 18:23:58 GMT+0100 (Central European Standard Time)
Resource Name: EPHEMERAL_TEMP_VM Detailed Error: [error while bootstrapping the machine [<CLUSTER_NAME>/EPHEMERAL_TEMP_VM];
unable to wait for post customization phase [guestinfo.cloudinit.kind.cluster.capi.yaml.apply.status] : [invalid postcustomization phase: [failed] for key [guestinfo.cloudinit.kind.cluster.capi.yaml.apply.status] for vm [EPHEMERAL_TEMP_VM] due to :
[<13>Jan 20 17:23:42 <CLUSTER_NAME>@1234567/<USER_NAME>: + kubectl apply -f /root/infrastructure-vcd/1.0.0/capi_mini.yaml
<13>Jan 20 17:23:42 <CLUSTER_NAME>@1234567/<USER_NAME>: cluster.cluster.x-k8s.io/<CLUSTER_NAME> created
<13>Jan 20 17:23:42 <CLUSTER_NAME>@1234567/<USER_NAME>: secret/capi-user-credentials created
<13>Jan 20 17:23:42 <CLUSTER_NAME>@1234567/<USER_NAME>: vcdmachinetemplate.infrastructure.cluster.x-8s.io/<CLUSTER_NAME>-control-plane-node-pool created
<13>Jan 20 17:23:42 <CLUSTER_NAME>@1234567/<USER_NAME>: kubeadmcontrolplane.controlplane.cluster.x-k8s.io/<CLUSTER_NAME>-control-plane-node-pool created
<13>Jan 20 17:23:42 <CLUSTER_NAME>@1234567/<USER_NAME>: vcdmachinetemplate.infrastructure.cluster.x-k8s.io/<CLUSTER_NAME>-worker-node-pool-1 created
<13>Jan 20 17:23:42 <CLUSTER_NAME>@1234567/<USER_NAME>: kubeadmconfigtemplate.bootstrap.cluster.x-k8s.io/<CLUSTER_NAME>-worker-node-pool-1 created
<13>Jan 20 17:23:42 <CLUSTER_NAME>@1234567/<USER_NAME>: machinedeployment.cluster.x-k8s.io/<CLUSTER_NAME>-worker-node-pool-1 created
<13>Jan 20 17:23:42 <CLUSTER_NAME>@1234567/<USER_NAME>: Error from server: error when creating "/root/infrastructure-vcd/1.0.0/capi_mini.yaml": admission webhook "default.vcdcluster.infrastructure.cluster.x-k8s.io" denied the request: json: cannot unmarshal number into Go struct field VCDClusterSpec.spec.org of type string
<13>Jan 20 17:23:42 <CLUSTER_NAME>@1234567/<USER_NAME>: ++ catch 1 218]]] during cluster creation
VMware Cloud Director 10.x
This issue occurs if the 'org
' parameter specified in the CSE configuration yaml file is a numeric value.
This issue is resolved in CSE 4.0.2 which is available for download here.