Virtual 4G Simulation Using Kubernetes And GNS3

This blog post is about how to deploy a virtual 4G stack using GNS3 and Kubernetes. It covers the following:


This is a companion discussion topic for the original entry at https://www.kubermatic.com/blog/virtual-4g-simulation-using-kubernetes-and-gns3/

Hey Sebastian / Christopher,
Could you please share the Dockerfiles you used for the OAI part? I’m struggling to build a container that’s able to run it and meet all the requirements,
Cheers,
Nick

Hi Nick,

Some of the code you could find here https://bitbucket.org/infinitydon/virtual-4g-simulator/src/master/open5gs/

Sebastian

Hi Sebastian / Christopher,

I am facing below error on deploying hss-database (mongodb):

ubuntu@oai-cn-kube:~/virtual-4g-simulator/open5gs$ kubectl logs -n open5gs mongo-0
error: a container name must be specified for pod mongo-0, choose one of: [mongo mongo-sidecar]

Can you help me to solve this issue.

Thanks in advance

You need to specify the container, try this

kubectl logs -n open5gs mongo-0 -c mongo
kubectl logs -n open5gs mongo-0 -c mongo-sidecar

Check also:

Thanks Sebastian.

Below is the output of commands (No output shown):

ubuntu@oai-cn-kube:~$ kubectl logs -n open5gs mongo-0 -c mongo

ubuntu@oai-cn-kube:~$ kubectl logs -n open5gs mongo-0 -c mongo-sidecar

Actually the problem is that when I deploy hss-db as suggested by you, then I see that mongodb is NOT deployed succesfully, below is status:

ubuntu@oai-cn-kube:~/virtual-4g-simulator/open5gs$ kubectl get pods -A
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system calico-kube-controllers-8f59968d4-lkvbd 1/1 Running 1 29h
kube-system calico-node-j9p4x 1/1 Running 1 29h
kube-system coredns-f9fd979d6-9hc7s 1/1 Running 1 29h
kube-system coredns-f9fd979d6-9ns4b 1/1 Running 1 29h
kube-system etcd-oai-cn-kube 1/1 Running 1 29h
kube-system kube-apiserver-oai-cn-kube 1/1 Running 1 29h
kube-system kube-controller-manager-oai-cn-kube 1/1 Running 4 29h
kube-system kube-proxy-tnbzf 1/1 Running 1 29h
kube-system kube-scheduler-oai-cn-kube 1/1 Running 4 29h
kubernetes-dashboard dashboard-metrics-scraper-7b59f7d4df-2czjk 1/1 Running 1 29h
kubernetes-dashboard kubernetes-dashboard-74d688b6bc-r48dj 1/1 Running 1 29h
open5gs mongo-0 0/2 Pending 0 3h20m

Can you help me to debug why it is not deployed properly?

Thanks in advance for your support

Hi Sebastian,

I am able to deploy hss-db successfully (problem was in CPU resources). Thanks for your support

Great that you have it working. Let us know you feedback.