Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 1.97 KB

local-kubernetes.md

File metadata and controls

51 lines (34 loc) · 1.97 KB

Local Kubernetes

For easier development workflow, the project has prebuilt tasks for both minikube and kind kubernetes tools.

As of 2023-02, the default behavior is to use minikube since it handles updating the kubeconfig locally a little more consistently in the tests run.

Working With Kubernetes & Stack Locally

NOTE For any tasks get more help with -h, for example, run mage -h k8s:init

For local development, Mage tasks have been created to automate most of the setup and usage for local testing.

  • Ensure your local configs/credentials.json exists.
  • run mage job:init to setup a local k8s cluster, initial local copies of the helm chart and kubernetes manifest files.
  • Modify the .cache/dsv-injector/values.yaml with the embedded credentials.json contents matching your configs/credentials.json.
  • Modify the .cache/manifests/*.yaml files to match the credentials you want to test against.
  • To deploy (or redeploy after changes) all the helm charts and kuberenetes manifests run mage job:redeploy.

Using Minikube With VM Driver

ℹ️ Using Minikube With VM Driver

To deploy to Minikube set-up with the VM driver, e.g., Linux kvm2 or Microsoft Hyper-V, enable the Minikube built-in registry and use it to make the image available to the Minikube VM:

minikube addons enable registry

❗NOTE: run Minikube tunnel in a separate terminal to make the registry service available to the host.

minikube tunnel

It will run continuously, and stopping it will render the registry inaccessible.

Next, get the host:port of the registry:

kubectl get -n kube-system service registry -o jsonpath="{.spec.clusterIP}{':'}{.spec.ports[0].port}"

Finally, follow the Remote Cluster instructions using it as $(REGISTRY)