Files
vault/website/content/docs/platform/k8s/helm/examples/kubernetes-auth.mdx
Yoko Hyakuna ed4664005b [DOCS] Fix style inconsistency (#29199)
* Fix style inconsistency

* Fix typos

* Update website/content/docs/platform/k8s/vso/secret-transformation.mdx

Co-authored-by: Jonathan Frappier <92055993+jonathanfrappier@users.noreply.github.com>

* Update website/content/docs/platform/k8s/helm/terraform.mdx

Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>

* Update website/content/docs/platform/k8s/injector/annotations.mdx

Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>

---------

Co-authored-by: Jonathan Frappier <92055993+jonathanfrappier@users.noreply.github.com>
Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>
2024-12-17 08:01:12 -08:00

33 lines
1004 B
Plaintext

---
layout: 'docs'
page_title: 'Bootstrapping Kubernetes auth method'
sidebar_current: 'docs-platform-k8s-examples-kubernetes-auth'
description: >-
Learn how to set up Kubernetes auth method.
---
# Bootstrapping Kubernetes auth method
@include 'helm/version.mdx'
In this example, we will walk through how to set up the [Kubernetes Auth Method](/vault/docs/auth/kubernetes).
This assumes the following commands will be run inside a Vault pod running in Kubernetes.
Exec into the Vault pod:
```bash
kubectl exec -it vault-0 -- /bin/sh
```
If you didn't set `server.dev.enabled=true`, you'll need to log in to Vault first using `vault login`.
Then run the following commands to configure the Kubernetes Auth Method:
```bash
vault auth enable kubernetes
vault write auth/kubernetes/config \
kubernetes_host=https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_SERVICE_PORT
```
From here you can continue to configure Vault from the [Kubernetes Auth Method](/vault/docs/auth/kubernetes) documentation.