Giter Site home page Giter Site logo

vault-on-k8s-p's Introduction

Lab: Vault on K8S using an init container

Introduction

This will take a while. I've done some of the work for you, to get you started, but there's a long way to go and a lot of stuff to understand. We will cover more of the theory behind this lab next week.

What will we do?

  1. Install vault in K3D
  2. Configure vault 2.1 Create an SA and a ClusterResourceBinding 2.2 Enable and configure k8s auth method 2.4 Create a policy for reading a secret and create a secret 2.5 Create a role bound to the SA 2.6 Verify that there is connectivity, etc.
  3. Configure an init container to provide secrets to your app
  4. Finally, run a sample app (nginx) and pass a secret into it

What you will learn

  1. How to install vault in K8S
  2. How to configure a basic policy and bind it to a role and service-account
  3. How to configure an init-container
  4. How to use that init-container to provide secrets to your app
  5. Some cool stuff about using colours in your bash output :)

How to get started

The makefile will create your cluster, conigure helm repos, etc. just like the previous labs. It will also install consul and vault. You shoud read how it does that, and look at the helm values files. Once that is run, you should open a terminal and change to the platform/vault directory which is where the real fun starts. You can run the config.sh file you find there and it'll do most of the work for you, but getting it running isn't the only aim of the lab -- the main aim is to work out for yourself what its doing, how, and why.

Note:

There are some extra directories that we're not using (yet), like the app/corpora directory. You can ignore these (though it might give you some light relief to play with it).


Extension

If you get through all of that then you can extend this by removing the code that configures and uses the init container from the config script and replacing it with code that uses a sidecar to do the same thing, only better.

The subtitle above is a link to the docs. The docs above the anchor I've linked to aren't important.

vault-on-k8s-p's People

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.