KOTS: “Failed to render templates” message in Admin Console Prevents Config Saving

Kellen Fields
Kellen Fields
  • Updated

Author: Kellen F.

Date: 12/29/23

Audience:  Everyone

Environmental details: Self-hosted KOTS 9.6

Summary: 

When trying to upload the TLS cert to the KOTS admin panel, the user will see the error “Failed to render templates” message and can not save the configuration.

failedtorender.png

Solution:

  1. We must remove any binary certificate data from the configuration.
  2. Create a blank file titled emptyfile.txt with no data in it.
  3. Zero out the trusted_certificate_file with the following command:
/usr/local/bin/kubectl-kots set config jama-k8s -n default --key trusted_certificate_file --value-from-file emptyfile.txt

    4. If there is also offending data in the nginx_ssl_certificate_file, we must do the same to that file: 

/usr/local/bin/kubectl-kots set config jama-k8s -n default --key trusted_certificate_file --value-from-file emptyfile.txt

Cause:

The nginx_ssl_certificate_file or the trusted_certificate_file config value is set with binary data rather than being PEM-encoded. When this data is then templated into the trusted_certificate_data, it results in an invalid.YAML.

Prevention:

Confirm that any certificates uploaded are PEM encoded and not binary.

 

 

 

 

Related to

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.