Code Monkey home page Code Monkey logo

vault-kubernetes-demo's Introduction

vault-kubernetes-demo

This is a modified version of Brian Kassouf's repo: vault-kubernetes-demo.
Updates in this fork:

  • Using application specific namespaces
  • Updated main.go application to read Environment variables
  • Updated Vault CLI commands

Important: this is a demo. Please do not use this in production.

Usage

This is a demo on how to setup the Vault Kubernetes Auth method. The guide will provide steps to configure a Kubernetes Auth method, create service accounts in Kubernetes and run demo applications on Kubernetes that can successfully authenticate to Vault and retrieve a secret.

Pre-requisites

  • Vault server (>0.9.0), and a root or administrative token. There are a few ways to deploy Vault, below are some options.
docker rm -f dev-vault
VAULT_VERSION=1.2.0 docker run -p 8200:8200 --cap-add=IPC_LOCK -e 'VAULT_DEV_ROOT_TOKEN_ID=devroottoken' -d --name=dev-vault "vault:${VAULT_VERSION}"
export VAULT_ADDR="http://localhost:8200"; export VAULT_TOKEN="devroottoken"
vault status
  • Existing Kubernetes cluster. This guide has beek tested on GKE and OpenShift.
  • Connectivity between Vault and K8S
  • The ca.crt file from Kubernetes cluster creation

Example validation commands:

vault --version
# Ensure VAULT_ADDR and VAULT_TOKEN environment variables are exported correctly:
vault token lookup
kubectl cluster-info
kubectl get nodes

Steps

Git clone this repo using the command below and follow README guides:

git clone https://github.com/kawsark/vault-kubernetes-demo.git
cd vault-kubernetes-demo

This guide has a few parts:

  1. Configure Kubernetes
  2. Configure Vault server
  3. Deploy the basic example
  4. Deploy the sidecar example Note: pending updates
  5. Deploy the AWS secrets engine example Note: pending updates

vault-kubernetes-demo's People

Contributors

briankassouf avatar kawsark avatar calvn avatar

Watchers

James Cloos 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.