<p>i created ubuntu machine that will receive the audit log from my cluster.
i created config file in order to configure the webhook backend for k8s auditing.</p>

<pre><code>apiVersion: v1
kind: Config
clusters:
- cluster:
    server: http://34.68.115.34
  name: webcluster
contexts:
- context:
    cluster: webcluster
    user: ""
  name: default-context
current-context: default-context
preferences: {}
users: []
</code></pre>

<p>i didnt find any option to configure the relevant authentication in case of using https.
what is the solution for that?</p>

inza
<p>You can use basic auth for http or certificate for https. When kube api server communicates to the webhook it will present the client certificate to the webhook webserver to authenticate itself. You need to have cacert in your webhook webserver to successfully authenticate kuernetes api server. The same cacert you will need to use to generate the client certificate and add that client cert into the kubeconfig file.</p>

<p><strong>Basic Auth:</strong></p>

<pre><code>apiVersion: v1
kind: Config
preferences: {}
clusters:
- name: example-cluster
  cluster:
    server: http://10.1.35.4
users:
- name: example-user
  user:
    username: some-user
    password: some-password
contexts:
- name: example-context
  context:
    cluster: example-cluster
    user: example-user
current-context: example-context
</code></pre>

<p><strong>Certificate:</strong></p>

<pre><code>apiVersion: v1
    kind: Config
    preferences: {}
    clusters:
    - name: example-cluster
      cluster:
        server: https://10.1.35.4
    users:
    - name: example-user
      user:
        client-certificate-data: &lt;redacted&gt;
        client-key-data: &lt;redacted&gt;
    contexts:
    - name: example-context
      context:
        cluster: example-cluster
        user: example-user
    current-context: example-context
</code></pre>
