Repository with terraform code.
.
├── DEV
│ ├── backend.tf
│ ├── main.tf
│ └── variables.tf
├── Module
│ └── GKE
│ ├── main.tf
│ └── variables.tf
└── PROD
├── backend.tf
├── main.tf
└── variables.tf
Repository use terrafroms backend files, so Cloud Storage is require.
cd DEV # or PROD
terraform init
terraform apply \
-var="path=<path-to-credentional-file>" \
-var="project=<project-name>"
Related with LinuxPolska Blog Post.
.
├── base
│ ├── deployment.yaml
│ ├── kustomization.yaml
│ ├── namespace.yaml
│ └── service.yaml
├── dev
│ └── kustomization.yaml
└── prod
├── increase_replicas.yaml
└── kustomization.yaml
After authentication to kubernetes cluster use
kubectl kustomize dev | k apply -f -
# or
kubectl kustomize prod | k apply -f -
In case of dry run type
kubectl kustomize dev
# or
kubectl kustomize prod