towerops/k8s/README.md
2026-01-03 15:26:48 -06:00

926 B

Kubernetes Deployment

Secrets Management

Secrets are stored in .envrc files (gitignored):

  • Project root .envrc - Used by direnv for local development
  • k8s/.envrc - Used by Kustomize for secret generation

Kustomize automatically generates the towerops-sendgrid Secret from k8s/.envrc using the secretGenerator in kustomization.yaml.

Both .envrc files should contain:

# SendGrid Configuration
SENDGRID_API_KEY=your-api-key-here
export SENDGRID_API_KEY

The KEY=VALUE format works for both Kustomize and direnv.

Deploying

Apply all resources using kustomize:

kubectl apply -k k8s/

Or individually:

kubectl apply -f k8s/namespace.yaml
kubectl apply -f k8s/secret.yaml
kubectl apply -f k8s/deployment.yaml
kubectl apply -f k8s/service.yaml
kubectl apply -f k8s/service-headless.yaml
kubectl apply -f k8s/certificate.yaml
kubectl apply -f k8s/ingressroute.yaml