A local Kubernetes development environment on macOS using DevSpace, featuring Gateway, observability, DNS integration, and certificate management.
devspace deploy
This starter pack provides a complete local Kubernetes development infrastructure with:
- HTTP(S) Gateway: Istio with Gateway API and Ingress for traffic management
- Load Balancing: MetalLB for LoadBalancer services on local clusters
- DNS Integration: External DNS with CoreDNS for
.kube
domain resolution - Certificate Management: Complete CA chain with cert-manager and trust-manager
- Observability: Prometheus, Grafana, Loki, Tempo, and Alloy for monitoring [TODO]
- Data Storage: PostgreSQL, Redis, and ElasticSearch options
- Developer Experience: Automatic certificate import, DNS configuration, and network setup
- DevSpace (>= v6.0): Install Guide
- kubectl: Kubernetes CLI
- yq (>= v4): YAML processor
- Helm (>= v3): Package manager for Kubernetes
- Docker Desktop
- Minikube (edit
DOCKER_CIDR_PREFIX
)
- Homebrew: For installing
docker-mac-net-connect
- Admin privileges: Required for DNS configuration and certificate import
git clone <repository-url>
cd devspace-starter-pack
Deploy all infrastructure components:
devspace deploy
Deploy specific profiles:
# Add databases
devspace deploy --profile local-psql,local-redis
Check that all components are running:
kubectl get pods --all-namespaces
Test DNS resolution:
dns-sd -q ns.dns.kube
NOTE: on macOS, do not rely on dig
for testing DNS resolution.
Profile | Description | Components |
---|---|---|
local-network |
Core networking infrastructure | MetalLB, Istio, Gateway API |
local-dns |
DNS integration for development | External DNS, CoreDNS, etcd |
local-certs |
Certificate management | cert-manager, trust-manager, reflector |
local-aux |
Auxiliary services | Reloader |
local-test |
Test applications | httpbin with routes |
o11y |
Core observability | Prometheus, Grafana, metrics-server |
o11y-addons |
Extended observability | Alloy, Loki, Tempo |
local-psql |
PostgreSQL database | PostgreSQL with persistence |
local-redis |
Redis cache | Redis with persistence |
local-es |
ElasticSearch | Single-node ElasticSearch |
Find all available commands:
devspace list commands
# Configure host DNS to use cluster DNS for .kube domains
devspace run update-cluster-dns
# Reset DNS configuration
devspace run reset-cluster-dns
# Import cluster root CA certificate to macOS keychain
devspace run import-root-ca
- Network Connectivity: Automatically installs and configures
docker-mac-net-connect
for seamless networking - DNS Integration: Configures macOS to resolve
.kube
domains through the cluster DNS - Certificate Trust: Imports cluster CA certificates to macOS keychain for trusted HTTPS
*.int.kube
autowired for Gateway API*.istio.kube
autowired for Istio Ingress- Gateway API and Istio Ingress support for traffic management
- Automatic TLS termination with custom certificates
- Traffic routing for microservices
- Complete CA chain (Cluster Root CA → Intermediate CA → Leaf certificates)
- Automatic certificate renewal
- Trust bundle distribution across namespaces
- Custom certificate chain in
charts/cert-chain/
.kube
domain resolution for all services of typeLoadbalancer
- External DNS automatically creates DNS records
- Prometheus: Metrics collection and alerting
- Grafana: Visualization and dashboards
- Loki: Log aggregation
- Tempo: Distributed tracing
- Alloy: OpenTelemetry collection
Customize component configurations in helm-values/
:
Customize the certificate chain in charts/cert-chain/values.yaml
or create custom values files.
# Check DNS configuration
devspace run reset-cluster-dns
devspace run update-cluster-dns
# Verify CoreDNS is running
kubectl get pods -n external-dns
# Check certificate status
kubectl get certificates --all-namespaces
kubectl describe certificate cluster-root-ca -n cert-manager
# Re-import root CA
devspace run import-root-ca
# Check docker-mac-net-connect status
brew services list | grep docker-mac-net-connect
# Restart network connectivity
sudo brew services restart chipmk/tap/docker-mac-net-connect
# Check MetalLB status
kubectl get pods -n metallb-system
kubectl get ipaddresspools -n metallb-system
- Deploy Infrastructure:
devspace deploy --profile local-network,local-certs
- Add DNS (optional):
devspace deploy --profile local-dns
- Add Observability (optional):
devspace deploy --profile o11y
- Deploy Your Applications: Use the configured Gateway and DNS
- Access Services: Via
*.kube
domains with automatic HTTPS
Remove all deployed resources:
devspace purge
Reset macOS DNS configuration:
devspace run reset-cluster-dns
Licensed under the Apache License, Version 2.0. See LICENSE for the full license text.