Metrics-server is missing `metrics-server-certs` secrets

Solution Verified - Updated -

Environment

  • Red Hat Openshift Container Platform
    • 3.11

Issue

  • Metrics-server-certs are deleted.
  • How to regenerate metric-server-certs?

Resolution

  • To regenerate the metric-server-certs , the Metric-server stack should be redeployed.
Uninstall `metric-server`,

# ansible-playbook -i <path to inventory file> /usr/share/ansible/openshift-ansible/playbooks/metrics-server/config.yml -e openshift_metrics_server_install=false


and install it again.

# ansible-playbook -i <path to inventory file> /usr/share/ansible/openshift-ansible/playbooks/metrics-server/config.yml -e openshift_metrics_server_install=true

Diagnostic Steps

  • Confirm the metric-server-certs are missing by listing the secrets in the namespace.
# oc get secrets -n openshift-metrics-server
  • The audit logs configured in the cluster can be analyzed to confirm if the secret is accidentally deleted by any of the users.

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.