Git Product home page Git Product logo

vault-k8s-cluster's Introduction

Vault k8s cluster

Current supported versions:

  • consul: 1.0.7
  • vault: 0.10.0

Requirements

  • A kubectl context is already set to the target k8s cluster.
  • consul, vault and cfssl on the client.
  • a public host fronting the vault api, like vault.example.com and a public certificates.

For example for certificates from Let's Encrypt and vault.example.com you should put the certificates at vault.example.com/privkey.pem and vault.example.com/fullchain.pem.

Usage

VAULT_HOST=vault.example.com ./bin/setup_vault

What happen

  • A ca root certificates is created, and certificates are generated for consul and vault for internal communication.
  • A 3 replicas Consul statefulset is created and configured.
  • A 2 replicas Vault statefulset is created and configured.
  • A 2 replicas Nginx deployment for exposing the vault cluster and ssl termination.

Caveat

  • For disaster recovery, and backup should be done regularly of the consul cluster, for example using consul snapshot save command.
  • At this time, in order to use the consul dns from any node, which allows nginx to query the active vault replica using active.vault.service.consul, we configure kube-dns using the ips of the 3 consul replicas. If these instances crash, new ips are issued for the pods, and the vault cluster might become inaccessible from outside (nginx not being able to use active.vault.service.consul). Using a loadbalancer doesn't seem to work.

vault-k8s-cluster's People

Contributors

gobadiah avatar

Watchers

Piotr Gaczkowski avatar James Cloos avatar  avatar Nicolas Debernardi 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.