Enabling HTTPS for AWX on K3S

by

in

The standard AWX installation works on port 80/http which in today’s enterprise security standard is unacceptable. Here is how to get HTTPS working using your own certificates.


Step 1: Create Ingress Resource

Create a new file named awx-ingress.yml and add the following Ingress resource configuration:

if you are using aliases then can use something like below:

Apply the Ingress resource using the following command:

Step 2: Update AWX Custom Resource (CR)

Update the AWX Custom Resource (CR) to use the Ingress with TLS configuration. Add the following lines to your AWX CR (awx.yml):

Apply the changes using the following command:

Step 3: Install Custom Certificates

Update the existing Kubernetes Secret with your new certificates using the following command:

See notes at the end on how to create CSR to generate your custom certificate.

Replace <path-to-new-cert> with the path to your new certificate file, and <path-to-new-key> with the path to your new private key file.

Step 4: Verify the Secret

Ensure that the secret has been updated correctly using the following command:

Step 5: Restart AWX Pods

Restart the AWX pods to apply the new certificates using the following commands:

Step 6: Verify HTTPS

To verify that HTTPS is enabled, open a web browser and navigate to https://awx.ad.mitsuk.com. You should see a secure connection indicated by a padlock icon in the browser’s address bar. You can also use the curl command to test the HTTPS connection:


By following these streamlined steps, you should be able to enable HTTPS and install custom certificates for your AWX setup on K3S. If you have any further questions or need additional assistance, feel free to ask!

Extra Notes:

How to create CSR for certificate request

And if you are using windows CA, then copy above awx.csr to CA server and run the following powershell command:

Once above is complete, copy the generated cert to awx server.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *