Knative Error: error: configmaps “config-defaults” could not be patched

Error

$ kubectl edit configmap config-defaults -n knative-serving
error: configmaps "config-defaults" could not be patched: admission webhook "config.webhook.serving.knative.dev" denied the request: validation failed: the update modifies a key in "_example" which is probably not what you want. Instead, copy the respective setting to the top-level of the ConfigMap, directly below "data"
You can run `kubectl replace -f /tmp/kubectl-edit-63711300.yaml` to try this update again.

Solution

Sure, you can change the knative config concurrency to 10 by updating the config-defaults ConfigMap. The following command will update the config-defaults ConfigMap to set the concurrency to 10:

kubectl apply -f - <<EOF
apiVersion: v1
kind: ConfigMap
metadata:
  name: config-defaults
  namespace: knative-serving
data:
  container-concurrency: "10"
EOF
This command will update the config-defaults ConfigMap with the following contents:

container-concurrency: "10"
The next time a new revision is created, it will have a concurrency of 10.

You can verify that the config has been updated by running the following command:

kubectl get configmap config-defaults -n knative-serving

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x