Compressing the Sitecore license file
The Sitecore license file is typically passed to the container instances as an environment variable in encoded string form. The Sitecore license file is very large. You must therefore compress and Base64 encode it to ensure that it conforms with the maximum size allowed by Windows for all the environment variables.
The appendix Encode and compress the Sitecore license file contains a sample PowerShell script that converts a license file into a Base64 compressed string for use in a K8s secret.
When you have compressed and encoded the license file, copy the string value to the license secret text file sitecore-license.txt.
Some Sitecore license files are so large that they are incompatible with containers even after compression. This usually happens when the license file contains additional embedded HTML.
As a workaround, you can mount the license file as a container volume from the host to the c:\inetpub\wwwroot\app_data\license.xml file inside the container. For more information and a configuration example, see the .