-
Notifications
You must be signed in to change notification settings - Fork 0
K8s Deployment
Andy Potanin edited this page Jun 21, 2026
·
1 revision
Creates a Kubernetes Deployment from a native manifest definition.
Use this module when a Rabbit service needs a Deployment with full control over pod spec, containers, volumes, and update strategy.
- Deployment creation from a standard Kubernetes manifest.
- Replica count configuration.
- Rolling update strategy with configurable surge and unavailability.
- Init containers and sidecar containers.
- Volume mounts and volume definitions.
- Environment variables from ConfigMaps, Secrets, and field references.
- Liveness, readiness, and startup probes.
- Resource requests and limits.
- Service account assignment.
- Security contexts.
- Labels, annotations, and selectors.
- A kubeconfig secret created by the
k8s-accessmodule. - The target namespace must exist.
- Container images must be accessible from the cluster (typically from
us-central1-docker.pkg.dev/rabbit-cdmsqarskcacnbpe/).
- The
configurationskey accepts a complete Kubernetes Deployment manifest (withoutapiVersionandkind). - On first deploy, if the rollout times out, the Terraform state may record null identity values. Subsequent runs fail with
Unexpected Identity Change. Fix by deleting the deployment and running a destroy cycle (see CLAUDE.md failure modes). - Deploy
productionbeforedevelop-*branches to avoid TF state corruption.
services:
- name: "k8s Deployment"
module: "k8s-deployment"
id: "app-deployment"
deployment_order: 100
configurations:
metadata:
name: "www-example-com"
namespace: "www-example-com"
labels:
app: "www-example-com"
spec:
replicas: 1
selector:
matchLabels:
app: "www-example-com"
template:
metadata:
labels:
app: "www-example-com"
spec:
serviceAccountName: "www-example-com-sa"
containers:
- name: "worker-site"
image: "us-central1-docker.pkg.dev/rabbit-cdmsqarskcacnbpe/worker-site/worker-site:latest"
ports:
- containerPort: 80This module does not produce outputs.
The configurations key accepts a native Kubernetes Deployment manifest body. See the Kubernetes Deployment spec for the full schema.
configurations:
metadata:
name: ""
namespace: ""
labels: {}
annotations: {}
spec:
replicas: 1
selector:
matchLabels: {}
strategy:
type: "RollingUpdate"
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template:
metadata:
labels: {}
spec:
serviceAccountName: ""
containers: []
initContainers: []
volumes: []- GCP GKE Cluster
- GCP GKE Node Pool
- GCP IAM
- GCP Monitoring
- GCP Networking
- GCP PostgreSQL Instance
- GCP Secret Manager
- GCP SQL Instance
- GCP Static IP
- GCP Storage