Hi Sebastian,
I managed to get Squidex up and running in a new AKS cluster testing environment.
I followed the instructions from this doc:
https://docs.squidex.io/01-getting-started/installation/platforms/install-on-kubernetes
I’m looking at the Helm chart templates, values.yml etc (https://github.com/Squidex/squidex/tree/master/helm/squidex7) trying to understand how all of the Kubernetes resources get created.
Question 1: One thing that I don’t really understand is how the StatefulSet
gets created? I couldn’t find any template in the helm chart GitHub repo.
❯ k describe statefulsets.apps squidex-mongodb-replicaset
Name: squidex-mongodb-replicaset
Namespace: mse
CreationTimestamp: Thu, 27 Jul 2023 13:39:45 +0200
Selector: app=mongodb-replicaset,release=squidex
Labels: app=mongodb-replicaset
app.kubernetes.io/managed-by=Helm
chart=mongodb-replicaset-3.9.6
heritage=Helm
release=squidex
Annotations: meta.helm.sh/release-name: squidex
meta.helm.sh/release-namespace: mse
Replicas: 3 desired | 3 total
Update Strategy: RollingUpdate
Partition: 0
Pods Status: 3 Running / 0 Waiting / 0 Succeeded / 0 Failed
Pod Template:
Labels: app=mongodb-replicaset
release=squidex
Annotations: checksum/config: 955d248e96a48d052e38ecd28cfbcc15f0ae8e7fc13fc97509ad8235d4c53fda
Init Containers:
copy-config:
Image: busybox:1.29.3
Port: <none>
Host Port: <none>
Command:
sh
Args:
-c
set -e
set -x
cp /configdb-readonly/mongod.conf /data/configdb/mongod.conf
Environment: <none>
Mounts:
/configdb-readonly from config (rw)
/data/configdb from configdir (rw)
/work-dir from workdir (rw)
install:
Image: unguiculus/mongodb-install:0.7
Port: <none>
Host Port: <none>
Args:
--work-dir=/work-dir
Environment: <none>
Mounts:
/work-dir from workdir (rw)
bootstrap:
Image: mongo:3.6
Port: <none>
Host Port: <none>
Command:
/work-dir/peer-finder
Args:
-on-start=/init/on-start.sh
-service=squidex-mongodb-replicaset
Environment:
POD_NAMESPACE: (v1:metadata.namespace)
REPLICA_SET: rs0
TIMEOUT: 900
Mounts:
/data/configdb from configdir (rw)
/data/db from datadir (rw)
/init from init (rw)
/work-dir from workdir (rw)
Containers:
mongodb-replicaset:
Image: mongo:3.6
Port: 27017/TCP
Host Port: 0/TCP
Command:
mongod
Args:
--config=/data/configdb/mongod.conf
--dbpath=/data/db
--replSet=rs0
--port=27017
--bind_ip=0.0.0.0
Liveness: exec [mongo --eval db.adminCommand('ping')] delay=30s timeout=5s period=10s #success=1 #failure=3
Readiness: exec [mongo --eval db.adminCommand('ping')] delay=5s timeout=1s period=10s #success=1 #failure=3
Environment: <none>
Mounts:
/data/configdb from configdir (rw)
/data/db from datadir (rw)
/work-dir from workdir (rw)
Volumes:
config:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: squidex-mongodb-replicaset-mongodb
Optional: false
init:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: squidex-mongodb-replicaset-init
Optional: false
workdir:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
SizeLimit: <unset>
configdir:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
SizeLimit: <unset>
Volume Claims:
Name: datadir
StorageClass:
Labels: <none>
Annotations: <none>
Capacity: 10Gi
Access Modes: [ReadWriteOnce]
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal SuccessfulCreate 53m statefulset-controller create Pod squidex-mongodb-replicaset-0 in StatefulSet squidex-mongodb-replicaset successful
Normal SuccessfulCreate 51m statefulset-controller create Pod squidex-mongodb-replicaset-1 in StatefulSet squidex-mongodb-replicaset successful
Normal SuccessfulCreate 51m statefulset-controller create Pod squidex-mongodb-replicaset-2 in StatefulSet squidex-mongodb-replicaset successful
Question 2: What are these and how are they created?
Image: busybox:1.29.3
Image: unguiculus/mongodb-install:0.7
Image: mongo:3.6
Question 3: I came across the following article. Do you use any of the four methods mentioned in the article? If so, which one? I’m currently using https://github.com/mongodb/mongodb-kubernetes-operator in production and it works fine.