# Incomplete creation of MongoDB cluster on k3d or Minikube on MacOs M1

**URL:** <https://forums.percona.com/t/incomplete-creation-of-mongodb-cluster-on-k3d-or-minikube-on-macos-m1/28979>\
**Category:** Percona Everest\
**Created:** [March 6, 2024, 8:47am UTC](https://forums.percona.com/t/incomplete-creation-of-mongodb-cluster-on-k3d-or-minikube-on-macos-m1/28979 "2024-03-06T08:47:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniil.bazhenov](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/daniil.bazhenov/32/62_2.png) [@daniil.bazhenov](https://forums.percona.com/u/daniil.bazhenov)\
**Post date:** [March 6, 2024, 8:47am UTC](https://forums.percona.com/t/incomplete-creation-of-mongodb-cluster-on-k3d-or-minikube-on-macos-m1/28979/1 "2024-03-06T08:47:01Z")

</div>

Hi, I need some advice

I’m testing installing Percona Everest locally on k3d.

Postgres and MySQL database created successfully

MongoDB in infinite initialization, however.

I printed out the mongodb Pod information

```auto
kubectl -n app describe pod mongodb-p7y-rs0-0

```

I think it’s something to do with backup-agent

```auto
Normal Created 4m1s kubelet Created container backup-agent
  Normal Started 4m1s kubelet Started container backup-agent
  Warning Unhealthy 3m52s kubelet Readiness probe failed: 2024-03-06T08:38:49.024Z INFO Running Kubernetes readiness check for component {"component": "mongod"}
2024-03-06T08:38:49.043Z ERROR Member failed Kubernetes readiness check {"error": "dial: dial tcp [::1]:27017: connect: connection refused", "errorVerbose": "dial tcp [::1]:27017: connect: connection refused\ndial\ngithub.com/percona/percona-server-mongodb-operator/healthcheck.MongodReadinessCheck\n\t/go/src/github.com/percona/percona-server-mongodb-operator/healthcheck/readiness.go:32\nmain.main\n\t/go/src/github.com/percona/percona-server-mongodb-operator/cmd/mongodb-healthcheck/main.go:121\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:250\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1598"}
main.main
  /go/src/github.com/percona/percona-server-mongodb-operator/cmd/mongodb-healthcheck/main.go:123
runtime.main

```

 ![Screenshot 2024-03-06 at 12.40.52 PM](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/f/f3df74c2386402569e1ec9b6509d3cb337990407.png)

```auto
➜ 0.8.0 kubectl -n app get pods
NAME READY STATUS RESTARTS AGE
percona-xtradb-cluster-operator-6764857cd8-k9hfn 1/1 Running 0 57m
percona-server-mongodb-operator-5c86d5fd65-8b9wf 1/1 Running 0 56m
percona-postgresql-operator-86d959b94c-w4fn4 1/1 Running 0 55m
mysql-eo4-pxc-0 1/1 Running 0 45m
postgresql-jyx-pgbouncer-5d66fbf76b-krj6j 2/2 Running 0 32m
postgresql-jyx-pgbouncer-5d66fbf76b-f42c4 2/2 Running 0 32m
postgresql-jyx-repo-host-0 2/2 Running 0 32m
postgresql-jyx-backup-2dkq-s4mfr 0/1 Completed 0 22m
postgresql-jyx-instance1-d8ns-0 4/4 Running 0 32m
postgresql-jyx-instance1-hvk4-0 4/4 Running 0 32m
mongodb-3t6-rs0-0 1/2 CrashLoopBackOff 7 (4m28s ago) 41m
mongodb-p7y-rs0-0 1/2 Running 1 (3m39s ago) 7m55s
mysql-eo4-haproxy-0 1/2 Running 0 45m

```

Perhaps you can suggest what could be improved or fixed. Possible k3d needs to be configured somehow.

---

<div class="post-metadata">

**Author:** ![daniil.bazhenov](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/daniil.bazhenov/32/62_2.png) [@daniil.bazhenov](https://forums.percona.com/u/daniil.bazhenov)\
**Post date:** [March 6, 2024, 8:49am UTC](https://forums.percona.com/t/incomplete-creation-of-mongodb-cluster-on-k3d-or-minikube-on-macos-m1/28979/2 "2024-03-06T08:49:33Z")

</div>

MySQL also occasionally goes into initialization and then returns to UP.

I see Warning in the ha-proxy pod.

```auto
kubectl -n app describe pod mysql-eo4-haproxy-0

```

```auto
Normal Created 46m kubelet Created container pxc-monit
  Normal Started 46m kubelet Started container pxc-monit
  Warning Unhealthy 45m (x12 over 45m) kubelet Readiness probe failed: ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 2
  Warning Unhealthy 108s (x442 over 45m) kubelet Readiness probe failed: command "/usr/local/bin/readiness-check.sh" timed out

```

---

<div class="post-metadata">

**Author:** ![daniil.bazhenov](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/daniil.bazhenov/32/62_2.png) [@daniil.bazhenov](https://forums.percona.com/u/daniil.bazhenov)\
**Post date:** [March 6, 2024, 9:48am UTC](https://forums.percona.com/t/incomplete-creation-of-mongodb-cluster-on-k3d-or-minikube-on-macos-m1/28979/3 "2024-03-06T09:48:21Z")

</div>

Tried the same thing with Minikube.

```auto
 Created container backup-agent
  Normal Started 5m48s kubelet Started container backup-agent
  Warning Unhealthy 5m46s kubelet Readiness probe failed: 2024-03-06T09:38:31.751Z INFO Running Kubernetes readiness check for component {"component": "mongod"}
2024-03-06T09:38:31.832Z ERROR Member failed Kubernetes readiness check {"error": "dial: dial tcp 127.0.0.1:27017: connect: connection refused", "errorVerbose": "dial tcp 127.0.0.1:27017: connect: connection refused\ndial\ngithub.com/percona/percona-server-mongodb-operator/healthcheck.MongodReadinessCheck\n\t/go/src/github.com/percona/percona-server-mongodb-operator/healthcheck/readiness.go:32\nmain.main\n\t/go/src/github.com/percona/percona-server-mongodb-operator/cmd/mongodb-healthcheck/main.go:121\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:250\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1598"}
main.main
  /go/src/github.com/percona/percona-server-mongodb-operator/cmd/mongodb-healthcheck/main.go:123
runtime.main

```

Minikube was started by a command from the repository

```auto
make m8s-macos

```

```auto
k8s: ## Create a local minikube cluster
	minikube start --nodes=1 --cpus=4 --memory=4g --apiserver-names host.docker.internal

k8s-macos: k8s ## Create a local minikube cluster with MacOS specific configuration
	minikube addons disable storage-provisioner
	kubectl delete storageclass standard
	kubectl apply -f ./dev/kubevirt-hostpath-provisioner.yaml

```
