cert-manager/docs/devel
Euan Kemp 4736c4fe27 docs/devel: add 'deploy to minikube' docs
The rbac and docker-env bits are tricky enough that I think it's worth
documenting this.
2018-03-05 17:09:50 -08:00
..
README.md docs/devel: add 'deploy to minikube' docs 2018-03-05 17:09:50 -08:00

Develop with minikube

Start minikube

First, run minikube, and configure your local kubectl command to work with minikube; minikube typically does this automatically.

$ minikube version
minikube version: v0.25.0

$ minikube start --extra-config=apiserver.Authorization.Mode=RBAC
# Verify it works
$ kubectl cluster-info
# Should output a local master ip

$ kubectl create clusterrolebinding default-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default
$ helm init

Build a dev version of cert-manager for minikube

$ eval "$(minikube docker-env)"
$ make build
# ....
Successfully tagged quay.io/jetstack/cert-manager-controller:build

Deploy that version with helm

$ helm install --set image.tag=build --name cert-manager ./contrib/charts/cert-manager

From here, you should be able to do whatever manual testing or development you wish to.

Deploy a new version

In general, upgrading can be done simply by running make build, and then deleting the deployed pod using kubectl delete pod.

However, if you make changes to the helm chart or wish to change the controller's arguments, such as to change the logging level, you may also update it with the following:

$ helm upgrade  --set extraArgs="{-v=5}" --set image.tag=build cert-manager ./contrib/charts/cert-manager