<p>I have tried to persist the custom themes through <code>gcepersistentdisk</code> but when I enter the administration console it does not load anything, and checking the folder <code>/opt/jboss/keycloak/themes</code> is empty.</p>

<p>Also try creating a custom docker image (Dockerfile) by adding the following line to copy the custom themas.</p>

<p><code>COPY /source-folder/login /opt/jboss/keycloak/themes/login</code></p>

<p>although in the folder <code>/opt/jboss/keycloak/themes</code> I can see the new login folder, when I access the administration console I cannot see the custom theme login.</p>

<p>I can only view the custom theme when I do it with the following kubernet commands:</p>

<ol>
<li><p><code>kubectl exec POD --namespace keycloak - mkdir /opt/jboss/keycloak/themes/login</code></p></li>
<li><p><code>kubectl cp keycloak/login keycloak/POD:/opt/jboss/keycloak/themes/login</code></p></li>
</ol>

<p>With the previous commands if I can see the custom theme login in the administration console</p>

<p>I have tried using <code>gcePersistentDisk</code> as follows:</p>

<pre><code>spec:
  containers:
    - name: keycloak
   ...
   volumeMounts:
     - mountPath: /opt/jboss/keycloak/themes
       name: test-volume

  volumes:
    - name: test-volume
      gcePersistentDisk:
        pdName: pd-name
        fsType: ext4
</code></pre>

<p>In what way can I persist with custom themes when the pod restarts?</p>

Juanes30
<p>As I understand each theme should have own folder. It should be <code>themes/mytheme/login</code> instead of <code>themes/login</code>. For example, your local structure may look like:</p>

<pre><code>Dockerfile
themes
|-mytheme
  |-account
  |-admin
  |-login
    |-resources 
      |-css
      |-img
    |-theme.properties
  |-welcome
</code></pre>

<p>Docker file may look like:</p>

<pre><code>FROM jboss/keycloak:8.0.1
ADD ./themes /opt/jboss/keycloak/themes/
</code></pre>

<p>Build a docker image, run, then go to <code>Realm Settings -&gt; Themes</code> and select your theme. </p>
