x509: certificate has expired or is not yet valid: - cniackz/public GitHub Wiki
When facing an issue with this signature in old operator:
ERROR Unable to validate passed arguments in MINIO_ARGS:
env+tls://<base64value>:<base64value>@operator.minio-operator.svc.cluster.local:4222/webhook/v1/getenv/<tenant>:
Get "https://operator.minio-operator.svc.cluster.local:4222/webhook/v1/getenv/<tenant>?key=MINIO_ARGS":
x509: certificate has expired or is not yet valid: current time 2023-08-28T13:04:31Z is after 2023-08-25T05:24:06Z
You can do one of two things, you can append MINIO_ARGS to our secret or you can re-new the certificate. Let's explore the first approach:
- grep for
MINIO_ARGSvalue in the operator logs:kubectl logs <operator-pod-name> -n minio-operator | grep MINIO_ARGS | grep pool - Look for
<tenant-name>-tenant-env-configurationin your secrets in tenant-namespace - Look for
config.env: ... <base64-value> - copy this
base64-valueto your clipboard - and then do
echo <base64-value> | base64 --decode > config.env - then edit this file by adding the following line at the end of this file:
echo 'export MINIO_ARGS="https://deap-pool-0-{0...3}.deap-hl.minio-deap-tenant.svc.cluster.local/export{0...3}"' >> config.env
- then do:
cat config.env | base64 --wrap=0
-
copy the value you see on the console and update the secrets value via
kubectl edit secret <tenant-name>-env-configurationforconfig.env: <my-new-base64-value> -
once done you can delete the crashing pod it should pick up the newly updated secret.
-
In Short APPEND
MINIO_ARGSto theconfig.envFile in the Secret to overcome the issue.
In case above WorkAround does not work, you can try to renew the certificates, (applicable if we generate the cert or TLS is off):
- Delete
operator-tlsfrom the tenant and restart Operator, new will be created - Delete
operator-tlsfrom the operator and restart Operator, new will be created - Delete
operator-webhook-secretfrom the tenant and restart Operator, new will be created - Remove the appended
MINIO_ARGSfrom the secrets as this is no longer needed and not working at this point. - Re-start the minio sts and get back to running tenants.
Now and finally, if this is just because new cert is needed from the customer side, then all is needed is a new cert that they can push.