Tools, Utilities and Automation for Kubernetes Cluster Provisioning
- MicroK8s v1.30.1 or higher
- OpenSSL 3.0.2
- This script will add a new ip address to the CSR Template file for Microk8s.
- Restarts the microk8s services.
- Generates a new key, certificate and save it to the certificate directory in microk8s.
Expand and Generate Certificate tool
Extract Configuration [ action:{COMMAND}, --action={COMMAND} ]
COMMANDS:
Flush Older Resources [ cleanup, flush, remove ]
Update Certificate [ update ]
USAGES:
./generate_certificate.sh --action=update
-
The file named util.conf.template should have a few modification in order to update your certificate.
-
Here is how the unedited version of the configuration file looks:
# Change these variables. new_ip_address=123.123.123.123 update_active=false file_owner='root:microk8s' # IMPORTANT: Do not edit the following variables. template="csr.conf.template"
-
The
new_ip_address
this is used to define your new ip address that you want to add to your CA certificate. Please note that this can only be set once. If the IP Address is already in the csr.conf.template then the generate_certificate.sh script will just copy the csr.conf file and generate the new key and certificate. -
A variable named
update_activate
will determine if the new Key and Certificate are uploaded to the certs directory. -
The
file_owner
variable defines the permission of the backup directory and the new Key and Certificate.