AWS EKS Returns Error 'certificate has expired or is not yet valid'

Viewed 702

When I deploy new deployments or edit any settings, It returns following Error

Error creating: Internal error occurred: failed calling webhook "mpod.elbv2.k8s.aws": Post "https://aws-load-balancer-webhook-service.kube-system.svc:443/mutate-v1-pod?timeout=10s": x509: certificate has expired or is not yet valid: current time 2022-01-28T02:05:13Z is after 2022-01-20T10:00:30Z

How can i fix it??

2 Answers

I think the reason is because your time and date are not right. As I can see in the log, your time is 8 days behind the current day.

Please sync your time in this server and try again.

You need to have new certificate for aws-load-balancer-webhook-service. We have issuer set up in the cluster and when we get similar error in OPA we do a rollout restart for opa.

Related