Skip to content

Dmarcotrigiano/k8s-devenv

Repository files navigation

Kubernetes Native Developer Environment

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.

Features

  • 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

Getting Started

Mac OS

  1. Install Homebrew
  2. Install Docker Desktop
  3. Install Minikube
  4. Install Kubectl
  5. Install Helm
  6. Install Skaffold
  7. 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
  8. Install Ingress DNS:
    minikube addons enable ingress
    minikube addons enable ingress-dns
    minikube addons disable metrics-server
  9. 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'
  10. Install the local helm chart which provisions kubernetes resources that are intended to be long-running and not shut down when skaffold is interrupted.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages