sumichaaan / free5gc-k8s

Dockerized Free5gc and Kubernetes Manifests
12 stars 22 forks source link

error while deploying yaml file using kubectl command on instance #3

Closed PallaviTharigonda closed 3 years ago

PallaviTharigonda commented 3 years ago

Hi, I'm getting the following error: $kubectl apply -f 01_init_defaults.yaml error: error parsing 01_init_defaults.yaml: error converting YAML to JSON: yaml: invalid map key: map[interface {}]interface {}{"K8S_API_ADVERTISE_ADDRESS":interface {}(nil)}

I tried searching on google but didn't find anything helpful.Can you please help me with this issue?

infinitydon commented 3 years ago

This file should be used to create a kubernetes cluster using kubeadm.

You are not supposed to use this in an existing kubernetes cluster, it's a kubeadm installation configuration file

PallaviTharigonda commented 3 years ago

Can you please tell the steps for deploying free5gc to exisitng k8 scluster?

infinitydon commented 3 years ago

The manifests can be found at:

https://github.com/sumichaaan/free5gc-k8s/tree/master/manifests

nmpvinh commented 3 years ago

Hi @infinitydon ;

Sorry for this interruption, i'm trying to understand how i can utilize this k8s to create a helm chart for this, Could you possibly shed some light and help me with this?

Thanks.

infinitydon commented 3 years ago

@nmpvinh There is no need to use helm charts, the manifest files are using kustomize (https://kustomize.io/), you can deploy the amf for example using the kustomize option of the kubectl command:

kubectl apply -k f5gc-amf/

PallaviTharigonda commented 3 years ago

@infinitydon I've tried deploying on existing cluster /free5gc-k8s/manifests/f5gc-smf$ kubectl apply -f kustomization.yaml error: error validating "kustomization.yaml": error validating data: [apiVersion not set, kind not set]; if you choose to ignore these errors, turn validation off with --validate=false

I'm getting this kinda error

Also I tried setting validate=false

/free5gc-k8s/manifests/f5gc-smf$ kubectl apply --validate=false -f kustomization.yaml error: unable to decode "kustomization.yaml": Object 'Kind' is missing in '{"generatorOptions":{"disableNameSuffixHash":true},"namespace":"f5gc","resources":["00_smf-sa.yaml","01_smf-rbac.yaml","02_smf-configmap.yaml","03_smf-service.yaml","04_smf-multus.yaml","05_smf-deployment.yaml"],"secretGenerator":[{"files":["cert/smf.pem","cert/smf.key"],"name":"f5gc-smf-tls-secret","namespace":"free5gc","type":"Opaque"}]}'

I'm getting this error.

Please can you help with this :)

or Tell me if you want me to try another method.

infinitydon commented 3 years ago

@PallaviTharigonda That is not the procedure

Create the namespace first: kubectl create -f 00_namespace.yaml

Then create free5gc components e.g for AMF: kubectl apply -k f5gc-amf/

PallaviTharigonda commented 3 years ago

@infinitydon Thanks a ton.It's working fine .services are coming up.

Is there any way to make communication in between the services?

infinitydon commented 3 years ago

@PallaviTharigonda What do you mean by communication between the services? Services should be able to communicate normally.

PallaviTharigonda commented 3 years ago

Hi @infinitydon ,images are not pulling properly for me & pods are also not running.So I tried changing image name in "05_upf-deployment.yaml" from "ghcr.io/sumichaaan/free5gc-k8s/f5gc-upf:v3.0.4" to "docker.io/free5gc/upf".So now I can able to pull image but I'm getting error "Back-off restarting failed container". Here I'm attaching the snapshot of that issue.

Screenshot (57)

and regarding pods

image

Can you please help me with this issue?

infinitydon commented 3 years ago

@PallaviTharigonda - I suggest you try the following manifests:

https://github.com/free5gmano/free5gmano/tree/master/deploy/free5gc-stage-3.0.4/k8s-cni

PallaviTharigonda commented 3 years ago

@infinitydon thank you for providing the link.Now my pods are coming up.

how can i check the communication is working between UPF and SMF based on PFCP.

I went inside the container and check logs for smf ..there I can see pfcp is sending image

but at the receiver side upf, I can't see any logs. image

should upf & smf should be in a same container?Can you please help me out.

infinitydon commented 3 years ago

@PallaviTharigonda I suggest you close this current issue because you are no longer using the manifests from this repo.

You can ping on linkedin for further communication on this.