Enroll your company as a CNCF End User and save more than $10K in training and conference costs
Become an End User
$ kubectl patch configmap api01-configmap -n default -p '{"data":{"DATABASE_PORT":"5444"}}' configmap/api01-configmap patched $ kubectl get cm -n default -o yaml api01-configmap apiVersion: v1 data: DATABASE_HOST: api01.ybdb.io DATABASE_NAME: api01 DATABASE_PORT: "5444" kind: ConfigMap metadata: creationTimestamp: "2024-05-22T10:06:39Z" name: api01-configmap namespace: default resourceVersion: "67651" uid: 2d49a0ea-6910-420c-b2bf-00e42e6c08d7 $ kubectl patch configmap api01-configmap -n default -p '{"data":{"DATABASE_PORT":"5444"}}' -o yaml apiVersion: v1 data: DATABASE_HOST: api01.ybdb.io DATABASE_NAME: api01 DATABASE_PORT: "5444" kind: ConfigMap metadata: creationTimestamp: "2024-05-22T10:47:41Z" name: api01-configmap namespace: default resourceVersion: "69416" uid: a303bd0e-7f61-49c0-b671-06649ecdf999 if [ "$action" == "add" ]; then echo "Action: $action" echo "Action: $action" >> update_cm.log while IFS= read -r cm; do echo "Updating ConfigMap: $cm" echo "Updating ConfigMap: $cm" >> update_cm.log kubectl patch configmap "$cm" -n "$NAMESPACE" -p $DATA >> patch.log 2>&1 done < "$CONFIGMAP_FILE" echo "Invalid action, please specify add". exit 1 echo "----------------------------" >> update_cm.log
$ kubectl patch configmap api01-configmap -n default -p '{"data":{"DATABASE_PORT":"5444"}}' -o yaml apiVersion: v1 data: DATABASE_HOST: api01.ybdb.io DATABASE_NAME: api01 DATABASE_PORT: "5444" kind: ConfigMap metadata: creationTimestamp: "2024-05-22T10:47:41Z" name: api01-configmap namespace: default resourceVersion: "69416" uid: a303bd0e-7f61-49c0-b671-06649ecdf999 if [ "$action" == "add" ]; then echo "Action: $action" echo "Action: $action" >> update_cm.log while IFS= read -r cm; do echo "Updating ConfigMap: $cm" echo "Updating ConfigMap: $cm" >> update_cm.log kubectl patch configmap "$cm" -n "$NAMESPACE" -p $DATA >> patch.log 2>&1 done < "$CONFIGMAP_FILE" echo "Invalid action, please specify add". exit 1 echo "----------------------------" >> update_cm.log