There are a number of options for importing a theme into a Kubernetes deployment, for example:
- Create a new Docker image that contains a custom theme.
-
Use an
emptyDirthat is shared with the Identity Service container and configure aninit containerthat runs the new theme image and copies it into the theme directory.The following is an example of configuring this in the
values.yaml:keycloak: extraInitContainers: | - name: custom-theme image: <theme-image-location-and-tag> imagePullPolicy: IfNotPresent command: - sh args: - -c - | echo "copying new theme..." cp -R /<theme-image-name>/* /theme volumeMounts: - name: theme mountPath: /theme extraVolumeMounts: | - name: theme mountPath: /opt/jboss/keycloak/themes/<theme-folder-name> extraVolumes: | - name: theme emptyDir: {}
However a new theme is imported, the new theme will need to be applied by signing into the administrator console and selecting the new themes for each component in the Themes tab under Realm Settings.