I'm quite new to kubernetes/terraform. Using Minikube.
These operations are quite simple, but I'm stuck.. It seems that after creating the kubeDB operator and the pg CRD object, the postgres cluster is not being deployed.
Here is what I'm doing in terraform to create the kubeDB operator:
resource "helm_release" "kubedb" {
name = "kubedb"
repository = "https://charts.appscode.com/stable/"
chart = "kubedb"
namespace = "db-ha-zone1"
version = "v2022.02.22"
set {
name = "global.license"
value = "${file(".license.txt")}"
}
}
Result is :
kubectl get pods
NAME READY STATUS RESTARTS AGE
kubedb-kubedb-provisioner-656c55fff5-zjgnv 1/1 Running 0 2m35s
kubedb-kubedb-webhook-server-7cb4bdd8f4-ns7j6 1/1 Running 0 2m35s
After I create the pg CRD with this yaml source :
apiVersion: kubedb.com/v1alpha2
kind: Postgres
metadata:
name: hot-postgres
namespace: db-ha-zone1
spec:
version: "14.2"
replicas: 3
standbyMode: Hot
authSecret:
name: postgres-auth
storageType: Durable
storage:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
terminationPolicy: DoNotTerminate
using a simple kubectl apply -f postgres.yaml.
Resource is created :
kubectl get pg
NAME VERSION STATUS AGE
hot-postgres 14.2 39s
But nothing happens afterward..
Could you please help me find out what I'm missing here ?
Thanks in advance for your help
I'm expecting the cluster primary pod and replicas to be deployed by the kubedb operator