How to create the ConfigMaps and Secrets needed to upgrade to OpenShift 4.13 when using Nutanix as a Platform
Environment
- OpenShift Container Platform 4.12
- Nutanix
Issue
- I am getting notified that my cluster isn't upgradable do to a missing ConfigMap
- Cloud Config Controller is not upgradeable due to missing "cloud-conf" ConfigMap MissingNutanixConfigMap
- What steps are needed to configure OpenShift to upgrade to 4.13 when using Nutanix as the Platform
Resolution
- Create the following Secrets and ConfigMaps prior to upgrading to OpenShift Container Platform 4.13 when running on the Nutanix Platform.
nutanix-credentials Secret
- Replace following variables in the snippet below and create the secret:
- Prism Central Username
- Prism Central Password
$ oc apply -f - <<EOF
apiVersion: v1
kind: Secret
metadata:
name: nutanix-credentials
namespace: openshift-cloud-controller-manager
type: Opaque
stringData:
credentials: "[{
\"type\":\"basic_auth\",
\"data\":{
\"prismCentral\":{
\"username\":\"<Prism Central Username>\",
\"password\":\"<Prism Central Password>\"},
\"prismElements\":null
}
}]"
EOF
cloud-provider-config ConfigMap
- Replace following variables and create the cloud-provider-config ConfigMap to the openshift-config namespace:
- Prism Central FQDN/IP
$ oc apply -f - <<EOF
apiVersion: v1
kind: ConfigMap
metadata:
name: cloud-provider-config
namespace: openshift-config
data:
config: "{
\"prismCentral\": {
\"address\": \"<Prism Central FQDN/IP>\",
\"port\": 9440,
\"credentialRef\": {
\"kind\": \"Secret\",
\"name\": \"nutanix-credentials\",
\"namespace\": \"openshift-cloud-controller-manager\"
}
},
\"topologyDiscovery\": {
\"type\": \"Prism\",
\"topologyCategories\": null
},
\"enableCustomLabeling\": true
}"
EOF
cloud-conf ConfigMap
- Replace following variables and create the cloud-conf ConfigMap to the openshift-cloud-controller-manager namespace:
- Prism Central FQDN/IP
$ oc apply -f - <<EOF
apiVersion: v1
kind: ConfigMap
metadata:
name: cloud-conf
namespace: openshift-cloud-controller-manager
data:
cloud.conf: "{
\"prismCentral\": {
\"address\": \"<Prism Central FQDN/IP>\",
\"port\": 9440,
\"credentialRef\": {
\"kind\": \"Secret\",
\"name\": \"nutanix-credentials\",
\"namespace\": \"openshift-cloud-controller-manager\"
}
},
\"topologyDiscovery\": {
\"type\": \"Prism\",
\"topologyCategories\": null
},
\"enableCustomLabeling\": true
}"
EOF
- Patch the cluster Infrastructure Resource:
$ oc patch infrastructure cluster --patch '{"spec":{"cloudConfig":{"key":"config","name":"cloud-provider-config"}}}' --type=merge
Root Cause
-
With the release of OpenShift Container Platform 4.13, the Nutanix Cloud Controller Manager has been integrated into OpenShift and requires additional ConfigMaps and Secrets to work properly with the Nutanix Platform. These ConfigMaps and Secrets must be created prior to performing the upgrading.
-
Starting with 4.12.14, checks are performed to ensure the required ConfigMaps and Secrets are in place and if they are missing the Cluster reports
Upgradeable=False.
Diagnostic Steps
- When running
oc adm upgradeyou see the errorUpgradeable=False
$ oc adm upgrade
Cluster version is 4.12.14
Upgradeable=False
Reason: MissingNutanixConfigMap
Message: Cluster operator cloud-controller-manager should not be upgraded between minor versions: Cloud Config Controller is not upgradeable due to missing "cloud-conf" ConfigMap
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.