Hey,
I’m getting started with this operator and am installing via helm, and creating a test resource from cr.yaml using kubectl apply -f https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/main/deploy/cr.yaml
I’m running under minikube with the kvm2 driver and docker as the container runtime. I’ve also tried containerd, and using the docker driver instead. All have the same result as below.
The result hasn’t quite been what I’d expected:
~/code/nc-helm >>> kubectl get pods
NAME READY STATUS RESTARTS AGE
mdb-psmdb-operator-d64bc65fd-spb9t 1/1 Running 0 9m32s
my-cluster-name-cfg-0 0/2 Init:0/1 0 2m53s
my-cluster-name-mongos-74f9b75bf4-9gfqc 0/1 Init:0/1 0 2m49s
my-cluster-name-mongos-74f9b75bf4-hfk58 0/1 Running 0 2m49s
my-cluster-name-mongos-74f9b75bf4-r2tvw 0/1 Running 0 2m49s
my-cluster-name-rs0-0 0/2 Init:Error 3 2m51s
~/code/nc-helm >>> kubectl logs my-cluster-name-rs0-0
error: a container name must be specified for pod my-cluster-name-rs0-0, choose one of: [mongod backup-agent] or one of the init containers: [mongo-init]
~/code/nc-helm >>> kubectl logs my-cluster-name-rs0-0 mongod [1]
Error from server (BadRequest): container "mongod" in pod "my-cluster-name-rs0-0" is waiting to start: PodInitializing
~/code/nc-helm >>> kubectl logs my-cluster-name-rs0-0 mongo-init [1]
++ id -u
++ id -g
+ install -o 99 -g 99 -m 0755 -D /ps-entry.sh /data/db/ps-entry.sh
install: cannot create regular file '/data/db/ps-entry.sh': Permission denied
~/code/nc-helm >>> kubectl logs my-cluster-name-cfg-0 mongo-init [1]
++ id -u
++ id -g
+ install -o 99 -g 99 -m 0755 -D /ps-entry.sh /data/db/ps-entry.sh
install: cannot create regular file '/data/db/ps-entry.sh': Permission denied
The only container which seems to run by default are the ones running mongos
. Is this expected? I’d expect the cr.yaml
from master to work with defaults set.
~/code/nc-helm >>> kubectl version
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.3", GitCommit:"ca643a4d1f7bfe34773c74f79527be4afd95bf39", GitTreeState:"archive", BuildDate:"2021-07-16T17:16:46Z", GoVersion:"go1.16.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.2", GitCommit:"092fbfbf53427de67cac1e9fa54aaa09a28371d7", GitTreeState:"clean", BuildDate:"2021-06-16T12:53:14Z", GoVersion:"go1.16.5", Compiler:"gc", Platform:"linux/amd64"}