Giter Club home page Giter Club logo

vault-controller's Introduction

Vault Controller

The Vault Controller automates the creation of Vault tokens for Kubernetes Pods. This repo includes a set of hands-on tutorials and example programs you can use to try out the Vault Controller.

Status

This is a prototype. Do not use this in production.

Use Case

  • Each Pod requires a dedicated Vault token tied to the Pod's life-cycle
  • Each Pod will use a dedicated Vault token to request secrets from a Vault server

Documentation

How it Works

The following diagram demonstrates the flow Pods use to obtain a dedicated token when running in a Kubernetes cluster.

Vault Controller Flow

  1. An Init container requests a wrapped token from the Vault Controller
  2. The Vault Controller retrieves the Pod details from the Kubernetes API server
  3. If the Pod exists and contains the vaultproject.io/policies annotation a unique wrapped token is generated for the Pod.
  4. The Vault Controller "callsback" the Pod using the Pod IP obtained from the Kubernetes API.
  5. The Init container unwraps the token to obtain a dedicated Vault token.
  6. The dedicated token is written to a well-known location and the Init container exits.
  7. Another container in the Pod reads the token from the token file.
  8. Another container in the Pod renews the token to keep it from expiring.

More details can be found in the How it Works document.

Usage

The following tutorials will guide you through the deployment of the vault-controller and an example application to see how it all works.

Prerequisites

Clone this repository:

git clone https://github.com/kelseyhightower/vault-controller.git
cd vault-controller

Before you can complete the tutorials you'll need access to a Kubernetes clusters. Google Container Engine (GKE) or minikube should work.

Tutorials

Cleanup

Once you are done with the tutorials run the following command to clean up:

kubectl delete namespace vault-controller

vault-controller's People

Contributors

kelseyhightower avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.