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 TLS cert in KOTS admin panel, user will see error “Failed to render templates” message and can not save config.

failedtorender.png

Solution:

  1. We must remove any binary certificate data in the config.
  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 to 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 in to the trusted_certificate_data, it results in invalid .YAML.

Prevention:

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

Related Articles, Work orders, Zendesk tickets, Defects, etc. 

 

  • Replicated ticket: https://github.com/replicated-collab/jama-replicated/issues/333

 

 

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.