<p>I have installed vault in kubernetes following the guide:
<a href="https://learn.hashicorp.com/vault/kubernetes/sidecar" rel="nofollow noreferrer">https://learn.hashicorp.com/vault/kubernetes/sidecar</a></p>
<pre class="lang-sh prettyprint-override"><code>helm repo add hashicorp https://helm.releases.hashicorp.com
helm install vault hashicorp/vault --set &quot;server.dev.enabled=true&quot;
</code></pre>
<p>This document shows that I should use the root access token: <a href="https://learn.hashicorp.com/vault/getting-started/ui" rel="nofollow noreferrer">https://learn.hashicorp.com/vault/getting-started/ui</a></p>
<p>But how do I get the root access token if the installation and auto unwrap was done inside of k8s?</p>
<p>There does not appear to be any secrets created to store this credential. I guess hashicorp team would label that as insecure.</p>
<p>But how then does one get the root token?</p>

Josh Woodcock
<p>When you run the vault in dev mode, the vault is initialized and unsealed automatically. You can see the logs by running</p>
<pre><code>$ kubectl logs -f vault-0
==&gt; Vault server configuration:

             Api Address: http://172.18.0.9:8200
                     Cgo: disabled
         Cluster Address: https://vault-0.vault-internal:8201
              Listener 1: tcp (addr: &quot;0.0.0.0:8200&quot;, cluster address: &quot;0.0.0.0:8201&quot;, max_request_duration: &quot;1m30s&quot;, max_request_size: &quot;33554432&quot;, tls: &quot;disabled&quot;)
               Log Level: info
                   Mlock: supported: true, enabled: false
           Recovery Mode: false
                 Storage: inmem
                 Version: Vault v1.4.2

WARNING! dev mode is enabled! In this mode, Vault runs entirely in-memory
and starts unsealed with a single unseal key. The root token is already
authenticated to the CLI, so you can immediately begin using Vault.

You may need to set the following environment variable:

    $ export VAULT_ADDR='http://0.0.0.0:8200'

The unseal key and root token are displayed below in case you want to
seal/unseal the Vault or re-authenticate.

Unseal Key: NINZtDfRBIogOqHQx1hRNhTXTzhAVf9ZqKxNcEKiMyo=
Root Token: root &lt;-- this is the root token

</code></pre>
