Skip to main content
  • SSL certificates used for secure communication between nodes in Kubernetes cluster are self-signed and have a 1 year validity period by default.
  • It is critical to renew these certificates before they expire. However, automating this renewal process is generally not recommended. Kubernetes generally encourages doing certificate renewal operations together with upgrades to new versions. This approach ensures the system stays current both in terms of security and compatibility.
  • Therefore, we strongly recommend that the certificate renewal process be executed in a planned and controlled manner to minimize potential risks and keep it under control. This is the best method to prevent possible interruptions and ensure security.

Creating Script

Create the script file:
Script content:

Making Script Executable

The script adds a cert_renewal.log file to the directory where you run it, and you can monitor execution logs from here.

Scheduled Execution (Cron)

You can ensure the script runs at a specific time or time period if desired. Cron can be used for this:
Add the following line to the opened file:
In the example usage, the script will run on the 1st day of each month at 23:59.