<p>I am using skywalking 6.5.0 to monitor my apps in kubernetes cluster, this is my skywalking ui yaml config:</p>
<pre><code>{
  &quot;kind&quot;: &quot;Deployment&quot;,
  &quot;apiVersion&quot;: &quot;extensions/v1beta1&quot;,
  &quot;metadata&quot;: {
    &quot;name&quot;: &quot;oap&quot;,
    &quot;namespace&quot;: &quot;fat&quot;,
    &quot;selfLink&quot;: &quot;/apis/extensions/v1beta1/namespaces/fat/deployments/oap&quot;,
    &quot;uid&quot;: &quot;41438118-5ae4-4da2-b3d5-6e082263e360&quot;,
    &quot;resourceVersion&quot;: &quot;44426777&quot;,
    &quot;generation&quot;: 52,
    &quot;creationTimestamp&quot;: &quot;2020-02-28T02:53:28Z&quot;,
    &quot;labels&quot;: {
      &quot;app&quot;: &quot;oap&quot;,
      &quot;release&quot;: &quot;skywalking&quot;
    },
    &quot;annotations&quot;: {
      &quot;deployment.kubernetes.io/revision&quot;: &quot;14&quot;,
      &quot;kubectl.kubernetes.io/last-applied-configuration&quot;: &quot;{\&quot;apiVersion\&quot;:\&quot;apps/v1\&quot;,\&quot;kind\&quot;:\&quot;Deployment\&quot;,\&quot;metadata\&quot;:{\&quot;annotations\&quot;:{},\&quot;name\&quot;:\&quot;oap\&quot;,\&quot;namespace\&quot;:\&quot;dabai-fat\&quot;},\&quot;spec\&quot;:{\&quot;replicas\&quot;:1,\&quot;selector\&quot;:{\&quot;matchLabels\&quot;:{\&quot;app\&quot;:\&quot;oap\&quot;}},\&quot;template\&quot;:{\&quot;metadata\&quot;:{\&quot;labels\&quot;:{\&quot;app\&quot;:\&quot;oap\&quot;,\&quot;release\&quot;:\&quot;skywalking\&quot;}},\&quot;spec\&quot;:{\&quot;containers\&quot;:[{\&quot;env\&quot;:[{\&quot;name\&quot;:\&quot;JAVA_OPTS\&quot;,\&quot;value\&quot;:\&quot;-Xmx2g -Xms2g\&quot;},{\&quot;name\&quot;:\&quot;SW_CLUSTER\&quot;,\&quot;value\&quot;:\&quot;standalone\&quot;},{\&quot;name\&quot;:\&quot;SKYWALKING_COLLECTOR_UID\&quot;,\&quot;valueFrom\&quot;:{\&quot;fieldRef\&quot;:{\&quot;fieldPath\&quot;:\&quot;metadata.uid\&quot;}}},{\&quot;name\&quot;:\&quot;SW_STORAGE\&quot;,\&quot;value\&quot;:\&quot;elasticsearch\&quot;},{\&quot;name\&quot;:\&quot;SW_STORAGE_ES_CLUSTER_NODES\&quot;,\&quot;value\&quot;:\&quot;172.30.184.10:9200\&quot;},{\&quot;name\&quot;:\&quot;SW_NAMESPACE\&quot;,\&quot;value\&quot;:\&quot;dabai-fat\&quot;},{\&quot;name\&quot;:\&quot;SW_ES_USER\&quot;,\&quot;value\&quot;:\&quot;elastic\&quot;},{\&quot;name\&quot;:\&quot;SW_ES_PASSWORD\&quot;,\&quot;value\&quot;:\&quot;XXXXXX\&quot;}],\&quot;image\&quot;:\&quot;registry.cn-hangzhou.aliyuncs.com/dabai_app_k8s/dabai_fat/skywalking-oap-server:6.5.0\&quot;,\&quot;imagePullPolicy\&quot;:\&quot;Always\&quot;,\&quot;livenessProbe\&quot;:{\&quot;initialDelaySeconds\&quot;:15,\&quot;periodSeconds\&quot;:20,\&quot;tcpSocket\&quot;:{\&quot;port\&quot;:12800}},\&quot;name\&quot;:\&quot;oap\&quot;,\&quot;ports\&quot;:[{\&quot;containerPort\&quot;:11800,\&quot;name\&quot;:\&quot;grpc\&quot;},{\&quot;containerPort\&quot;:12800,\&quot;name\&quot;:\&quot;rest\&quot;}],\&quot;readinessProbe\&quot;:{\&quot;initialDelaySeconds\&quot;:15,\&quot;periodSeconds\&quot;:20,\&quot;tcpSocket\&quot;:{\&quot;port\&quot;:12800}},\&quot;resources\&quot;:{\&quot;limits\&quot;:{\&quot;memory\&quot;:\&quot;2Gi\&quot;},\&quot;requests\&quot;:{\&quot;memory\&quot;:\&quot;1Gi\&quot;}}}],\&quot;imagePullSecrets\&quot;:[{\&quot;name\&quot;:\&quot;regcred\&quot;}],\&quot;serviceAccountName\&quot;:\&quot;skywalking-oap-sa\&quot;}}}}\n&quot;
    }
  },
  &quot;spec&quot;: {
    &quot;replicas&quot;: 1,
    &quot;selector&quot;: {
      &quot;matchLabels&quot;: {
        &quot;app&quot;: &quot;oap&quot;
      }
    },
    &quot;template&quot;: {
      &quot;metadata&quot;: {
        &quot;creationTimestamp&quot;: null,
        &quot;labels&quot;: {
          &quot;app&quot;: &quot;oap&quot;,
          &quot;release&quot;: &quot;skywalking&quot;
        },
        &quot;annotations&quot;: {
          &quot;kubectl.kubernetes.io/restartedAt&quot;: &quot;2020-04-18T18:30:58+08:00&quot;
        }
      },
      &quot;spec&quot;: {
        &quot;containers&quot;: [
          {
            &quot;name&quot;: &quot;oap&quot;,
            &quot;image&quot;: &quot;registry.cn-hangzhou.aliyuncs.com/dabai_app_k8s/dabai_fat/skywalking-oap-server:6.5.0&quot;,
            &quot;ports&quot;: [
              {
                &quot;name&quot;: &quot;grpc&quot;,
                &quot;containerPort&quot;: 11800,
                &quot;protocol&quot;: &quot;TCP&quot;
              },
              {
                &quot;name&quot;: &quot;rest&quot;,
                &quot;containerPort&quot;: 12800,
                &quot;protocol&quot;: &quot;TCP&quot;
              }
            ],
            &quot;env&quot;: [
              {
                &quot;name&quot;: &quot;JAVA_OPTS&quot;,
                &quot;value&quot;: &quot;-Xmx2g -Xms2g&quot;
              },
              {
                &quot;name&quot;: &quot;SW_CLUSTER&quot;,
                &quot;value&quot;: &quot;standalone&quot;
              },
              {
                &quot;name&quot;: &quot;SKYWALKING_COLLECTOR_UID&quot;,
                &quot;valueFrom&quot;: {
                  &quot;fieldRef&quot;: {
                    &quot;apiVersion&quot;: &quot;v1&quot;,
                    &quot;fieldPath&quot;: &quot;metadata.uid&quot;
                  }
                }
              },
              {
                &quot;name&quot;: &quot;SW_STORAGE&quot;,
                &quot;value&quot;: &quot;mysql&quot;
              },
              {
                &quot;name&quot;: &quot;SW_JDBC_URL&quot;,
                &quot;value&quot;: &quot;jdbc:mysql://45.131.218.134:3309/report?useUnicode=true&amp;characterEncoding=utf8&amp;zeroDateTimeBehavior=convertToNull&amp;transformedBitIsBoolean=true&amp;useSSL=false&amp;verifyServerCertificate=false&quot;
              },
              {
                &quot;name&quot;: &quot;SW_NAMESPACE&quot;,
                &quot;value&quot;: &quot;fat&quot;
              },
              {
                &quot;name&quot;: &quot;SW_DATA_SOURCE_USER&quot;,
                &quot;value&quot;: &quot;root&quot;
              },
              {
                &quot;name&quot;: &quot;SW_DATA_SOURCE_PASSWORD&quot;,
                &quot;value&quot;: &quot;uwesGwew2rewd109dskhgwugPD&quot;
              }
            ],
            &quot;resources&quot;: {
              &quot;limits&quot;: {
                &quot;memory&quot;: &quot;2Gi&quot;
              },
              &quot;requests&quot;: {
                &quot;memory&quot;: &quot;1Gi&quot;
              }
            },
            &quot;livenessProbe&quot;: {
              &quot;tcpSocket&quot;: {
                &quot;port&quot;: 12800
              },
              &quot;initialDelaySeconds&quot;: 15,
              &quot;timeoutSeconds&quot;: 1,
              &quot;periodSeconds&quot;: 20,
              &quot;successThreshold&quot;: 1,
              &quot;failureThreshold&quot;: 3
            },
            &quot;readinessProbe&quot;: {
              &quot;tcpSocket&quot;: {
                &quot;port&quot;: 12800
              },
              &quot;initialDelaySeconds&quot;: 15,
              &quot;timeoutSeconds&quot;: 1,
              &quot;periodSeconds&quot;: 20,
              &quot;successThreshold&quot;: 1,
              &quot;failureThreshold&quot;: 3
            },
            &quot;terminationMessagePath&quot;: &quot;/dev/termination-log&quot;,
            &quot;terminationMessagePolicy&quot;: &quot;File&quot;,
            &quot;imagePullPolicy&quot;: &quot;IfNotPresent&quot;
          }
        ],
        &quot;restartPolicy&quot;: &quot;Always&quot;,
        &quot;terminationGracePeriodSeconds&quot;: 30,
        &quot;dnsPolicy&quot;: &quot;ClusterFirst&quot;,
        &quot;serviceAccountName&quot;: &quot;skywalking-oap-sa&quot;,
        &quot;serviceAccount&quot;: &quot;skywalking-oap-sa&quot;,
        &quot;securityContext&quot;: {},
        &quot;imagePullSecrets&quot;: [
          {
            &quot;name&quot;: &quot;regcred&quot;
          }
        ],
        &quot;schedulerName&quot;: &quot;default-scheduler&quot;
      }
    },
    &quot;strategy&quot;: {
      &quot;type&quot;: &quot;RollingUpdate&quot;,
      &quot;rollingUpdate&quot;: {
        &quot;maxUnavailable&quot;: &quot;25%&quot;,
        &quot;maxSurge&quot;: &quot;25%&quot;
      }
    },
    &quot;revisionHistoryLimit&quot;: 10,
    &quot;progressDeadlineSeconds&quot;: 600
  },
  &quot;status&quot;: {
    &quot;observedGeneration&quot;: 52,
    &quot;replicas&quot;: 1,
    &quot;updatedReplicas&quot;: 1,
    &quot;unavailableReplicas&quot;: 1,
    &quot;conditions&quot;: [
      {
        &quot;type&quot;: &quot;Progressing&quot;,
        &quot;status&quot;: &quot;True&quot;,
        &quot;lastUpdateTime&quot;: &quot;2020-08-20T13:34:42Z&quot;,
        &quot;lastTransitionTime&quot;: &quot;2020-04-02T03:01:31Z&quot;,
        &quot;reason&quot;: &quot;NewReplicaSetAvailable&quot;,
        &quot;message&quot;: &quot;ReplicaSet \&quot;oap-7cffc4c77d\&quot; has successfully progressed.&quot;
      },
      {
        &quot;type&quot;: &quot;Available&quot;,
        &quot;status&quot;: &quot;False&quot;,
        &quot;lastUpdateTime&quot;: &quot;2020-08-20T13:34:52Z&quot;,
        &quot;lastTransitionTime&quot;: &quot;2020-08-20T13:34:52Z&quot;,
        &quot;reason&quot;: &quot;MinimumReplicasUnavailable&quot;,
        &quot;message&quot;: &quot;Deployment does not have minimum availability.&quot;
      }
    ]
  }
}
</code></pre>
<p>when the pod start, the log output like this:</p>
<pre><code>java.lang.RuntimeException: Failed to get driver instance for jdbcUrl=jdbc:mysql://45.131.218.134:3309/report?useUnicode=true&amp;characterEncoding=utf8&amp;zeroDateTimeBehavior=convertToNull&amp;transformedBitIsBoolean=true&amp;useSSL=false&amp;verifyServerCertificate=false
    at com.zaxxer.hikari.util.DriverDataSource.&lt;init&gt;(DriverDataSource.java:110) ~[HikariCP-3.1.0.jar:?]
    at com.zaxxer.hikari.pool.PoolBase.initializeDataSource(PoolBase.java:334) ~[HikariCP-3.1.0.jar:?]
    at com.zaxxer.hikari.pool.PoolBase.&lt;init&gt;(PoolBase.java:109) ~[HikariCP-3.1.0.jar:?]
    at com.zaxxer.hikari.pool.HikariPool.&lt;init&gt;(HikariPool.java:108) ~[HikariCP-3.1.0.jar:?]
    at com.zaxxer.hikari.HikariDataSource.&lt;init&gt;(HikariDataSource.java:81) ~[HikariCP-3.1.0.jar:?]
    at org.apache.skywalking.oap.server.library.client.jdbc.hikaricp.JDBCHikariCPClient.connect(JDBCHikariCPClient.java:44) ~[library-client-6.5.0.jar:6.5.0]
    at org.apache.skywalking.oap.server.storage.plugin.jdbc.mysql.MySQLStorageProvider.start(MySQLStorageProvider.java:123) ~[storage-jdbc-hikaricp-plugin-6.5.0.jar:6.5.0]
    at org.apache.skywalking.oap.server.library.module.BootstrapFlow.start(BootstrapFlow.java:61) ~[library-module-6.5.0.jar:6.5.0]
    at org.apache.skywalking.oap.server.library.module.ModuleManager.init(ModuleManager.java:67) ~[library-module-6.5.0.jar:6.5.0]
    at org.apache.skywalking.oap.server.starter.OAPServerStartUp.main(OAPServerStartUp.java:43) [server-starter-6.5.0.jar:6.5.0]
Caused by: java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getDriver(DriverManager.java:315) ~[?:1.8.0_181]
    at com.zaxxer.hikari.util.DriverDataSource.&lt;init&gt;(DriverDataSource.java:103) ~[HikariCP-3.1.0.jar:?]
    ... 9 more
</code></pre>
<p>I read the skywalking official issue and tell me because the mysql jdbc was GPL licence and SkyWalking is Apache license,so I must add the jdbc driver by myself, but how to add the jdbc driver jar into the image file? I have no ideas.</p>

Dolphin
<blockquote>
<p>how to add the jdbc driver jar into the image file?</p>
</blockquote>
<p>One way would be an <code>initContainer:</code> and then artificially inject the jdbc driver via <a href="https://wiki.openjdk.java.net/display/mlvm/BootClassPath" rel="nofollow noreferrer"><code>-Xbootclasspath</code></a></p>
<pre class="lang-yaml prettyprint-override"><code>initContainers:
- name: download
  image: busybox:latest
  command:
  - wget
  - -O
  - /foo/jdbc.jar
  - https://whatever-the-jdbc-url-jar-is-goes-here
  volumeMounts:
  - name: tmp
    mountPath: /foo
containers:
- env:
  - name: JAVA_OPTS
    value: -Xmx2g -Xbootclasspath/a:/foo/jdbc.jar
  volumeMounts:
  - name: tmp
    mountPath: /foo
volumes:
- name: tmp
  emptyDir: {}
</code></pre>
<p>a similar, although slightly riskier way, is to find a path that is already on the classpath of the image, and attempt to volume mount the jar path into that directory</p>
<p>All of this seems kind of moot given that your image looks like one that is custom built, and therefore the correct action is to update the <code>Dockerfile</code> for it to download the jar at build time</p>
