This is a Nx monorepo intended to be used to collocate Go microservices and Kubernetes manifests in a single repository. It is intended to be used as a starting point for a Kubernetes native developer environment.
- Nx monorepo with Go support
- Skaffold for local development
- ko for building Go binaries and Docker images
- Helm for deploying prepackaged manifests to Kubernetes
- NGINX Ingress Controller for routing traffic to services from the host machine
- Ingress DNS for resolving DNS names to the Ingress Controller on MacOS. For Linux, you can simply use
/etc/hosts
. - Kafka for event streaming between microservices
- Prometheus for monitoring
- Grafana for visualization
- Install Homebrew
- Install Docker Desktop
- Install Minikube
- Install Kubectl
- Install Helm
- Install Skaffold
- Start Minikube:
minikube start --driver=docker --kubernetes-version=v1.30.1 --bootstrapper=kubeadm --extra-config=kubelet.authentication-token-webhook=true --extra-config=kubelet.authorization-mode=Webhook --extra-config=scheduler.bind-address=0.0.0.0 --extra-config=controller-manager.bind-address=0.0.0.0
- Install Ingress DNS:
minikube addons enable ingress minikube addons enable ingress-dns minikube addons disable metrics-server
- Run the following command to add the DNS names of your ingress controller to your local DNS (refer to the Ingress DNS documentation for more information):
sudo bash -c 'cat <<EOF > /etc/resolver/minikube-test domain test nameserver $(minikube ip) search_order 1 timeout 5 EOF'
- Install the local helm chart which provisions kubernetes resources that are intended to be long-running and not shut down when skaffold is interrupted.