Gradiant / 5g-charts

Helm charts for 5G Technologies
Apache License 2.0
112 stars 44 forks source link

Issue in installing Open5GS on a Kubernetes cluster by openverso helm chart #67

Closed mayukhVT closed 2 years ago

mayukhVT commented 2 years ago

Hi,

I am trying to install Open5GS core on a kubernetes cluster by using helm charts. I am following "https://gradiant.github.io/openverso-charts/open5gs-srslte.html" to setup open5gs with srslte. I tried to install by executing:

"helm upgrade --install open5gs openverso/open5gs --version 1.2.1 --values https://gradiant.github.io/openverso-charts/docs/open5gs-srslte/epc-values.yaml"

But after executing this all the pods are not running. open5gs-mongodb pod is in Pending state. The following pods are in CrashLoopBackOff state: open5gs-hss, open5gs-pcrf. And open5gs-webui pod is in Init:CrashLoopBackOff state.

Here is the logs of open5gs-hss pod:

"08/09 14:18:14.303: [app] INFO: Configuration: '/opt/open5gs/etc/open5gs/hss.yaml' (../lib/app/ogs-init.c:126) 08/09 14:18:15.346: [dbi] WARNING: Failed to connect to server [mongodb://open5gs-mongodb/open5gs] (../lib/dbi/ogs-mongoc.c:122) 08/09 14:18:15.346: [app] WARNING: Failed to intialize HSS (../src/hss/app-init.c:28) "

Here is the log of open5gs-pcrf pod: " 08/09 14:19:56.304: [app] INFO: Configuration: '/opt/open5gs/etc/open5gs/pcrf.yaml' (../lib/app/ogs-init.c:126) 08/09 14:19:57.362: [dbi] WARNING: Failed to connect to server [mongodb://open5gs-mongodb/open5gs] (../lib/dbi/ogs-mongoc.c:122) 08/09 14:19:57.362: [app] WARNING: Failed to intialize PCRF (../src/pcrf/app-init.c:28) "

Here is the log of init container in open5gs-webui pod: " add admin user with password 1423 if no users MongoDB shell version v4.4.1 connecting to: mongodb://open5gs-mongodb:27017/open5gs?compressors=disabled&gssapiServiceName=mongodb Error: couldn't connect to server open5gs-mongodb:27017, connection attempt failed: SocketException: Error connecting to open5gs-mongodb:27017 (10.97.165.10:27017) :: caused by :: Connection refused : connect@src/mongo/shell/mongo.js:374:17 @(connect):2:6 exception: connect failed exiting with code 1 "

Here is the log of webui container in open5gs-webui pod: "Error from server (BadRequest): previous terminated container "webui" in pod "open5gs-webui-5747c779d-xlkqs" not found "

Output of "$ kubectl exec -it open5gs-mongodb-75f88f5464-wb6ff bash " is: " kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead. Error from server (BadRequest): pod open5gs-mongodb-75f88f5464-wb6ff does not have a host assigned "

Output of "$ kubectl describe pod open5gs-mongodb-75f88f5464-wb6ff" shows FailedScheduling warning with this message:

0/3 nodes are available: 3 pod has unbound immediate PersistentVolumeClaims. preemption: 0/3 nodes are available: 3 Preemption is not helpful for scheduling.

Looks like the issue is related to mongodb. Please let me know how to solve this.

Thanks.

cgiraldo commented 2 years ago

Your problem is with mongodb helm dependency. By default mongodb helm chart uses persistent volumes through a persistent volume claim (more info here).

helm upgrade --install open5gs openverso/open5gs --version 1.2.1 --values https://gradiant.github.io/openverso-charts/docs/open5gs-srslte/epc-values.yaml --set mongodb.persistence.enabled=false