# Development Guide
# Pre-requisites
Access to Kubernetes cluster
First of all, you will need access to a Kubernetes cluster. The easiest way to start is minikube.
- Virtualbox (opens new window) - hypervisor to run a Kubernetes cluster
- Minikube (opens new window) - for Kubernetes cluster creation on local machine
- Kubectl (opens new window) - to interact with Kubernetes cluster
Tools to build K8s Vault Webhook
Apart from kubernetes cluster, there are some tools which are needed to build and test k8s-vault-webhook.
# Build
Build Localy
To achieve this, execute this command:-
make build-code
Build Image
k8s-vault-webhook gets packaged as a container image for running on Kubernetes cluster. These instructions will guide you to build image.
make build-image
# Testing
If you want to play it on Kubernetes. You can use minikube.
#Start minikube
$ minikube start --vm-driver virtualbox
...
๐ minikube v1.0.1 on linux (amd64)
๐คน Downloading Kubernetes v1.14.1 images in the background ...
๐ฅ Creating kvm2 VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
๐ถ "minikube" IP address is 192.168.39.240
๐ณ Configuring Docker as the container runtime ...
๐ณ Version of container runtime is 18.06.3-ce
โ Waiting for image downloads to complete ...
โจ Preparing Kubernetes environment ...
๐ Pulling images required by Kubernetes v1.14.1 ...
๐ Launching Kubernetes v1.14.1 using kube๐ minikube v1.0.1 on linux (amd64)
๐คน Downloading Kubernetes v1.14.1 images in the background ...
๐ฅ Creating kvm2 VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
๐ถ "minikube" IP address is 192.168.39.240
๐ณ Configuring Docker as the container runtime ...
๐ณ Version of container runtime is 18.06.3-ce
โ Waiting for image downloads to complete ...
โจ Preparing Kubernetes environment ...
๐ Pulling images required by Kubernetes v1.14.1 ...
๐ Launching Kubernetes v1.14.1 using kubeadm ...
โ Waiting for pods: apiserver proxy etcd scheduler controller dns
๐ Configuring cluster permissions ...
๐ค Verifying component health .....
๐ kubectl is now configured to use "minikube"
๐ Done! Thank you for using minikube!adm ...
โ Waiting for pods: apiserver proxy etcd scheduler controller dns
๐ Configuring cluster permissions ...
๐ค Verifying component health .....
๐ kubectl is now configured to use "minikube"
๐ Done! Thank you for using minikube!
#Deploy the image on minikube
$ helm upgrade k8s-vault-webhook \
ot-helm/k8s-vault-webhook --namespace vault --install
...
Release "k8s-vault-webhook" has been upgraded. Happy Helming!
NAME: k8s-vault-webhook
LAST DEPLOYED: Mon May 3 19:55:03 2021
NAMESPACE: vault
STATUS: deployed
REVISION: 2
TEST SUITE: None
Running Test Cases
make test
โ GCP Secret Manager v4.0 โ