Tried to Setup ERPNext through k8's or helm on eks cluster and nfs storages

The first bench you add is a ui to operate your cluster of other benches. It can be further extended with your custom app.

It helps with managing benches, execute bench commands, manage ingress/sites, etc.

check screen videos here: Home · Wiki · castlecraft / k8s_bench_interface · GitLab

Created a post here Manage official or custom frappe-benches on Kubernetes

Hi Revant,

i think the one issue with my pvc i have followed the steps in the documentation. i’m struck at the final stage. here is the errors i facing. please help me.

Thanks,
Arjuna Sunkara

Pod logs.

Is AWS EFS csi driver installed properly? What are the pod logs for efs csi? https://github.com/kubernetes-sigs/aws-efs-csi-driver/blob/master/docs/README.md

I can’t help you further, I’ll need access to your AWS and time to debug it. There are other organisations running erpnext on eks with EFS csi.

Hi revant,

finally i found the issue and fixed that pvc one. but configured everything till which you provided in the documentation. pod are running fine as well. still i couldn’t able to see the dashboard. after kubectl -n erpnext apply -f apps/erpnext/kbi-ingress.yaml is there anything else which i have to do ?

Thanks,
Arjuna_Sunkara

do you have the ingress controller installed? optionally cert-manager.io for tls?

ingress controller installed. job are also fine. so i checked pod logs. attached SS please check.

have you configured appropriate name servers, wildcard CName/AName to point to your loadbalancer?

all are correct but one thing i observed was after ran the job. pod has been created and status was shown running and 1/1 within few seconds it was went to completed state and 0/1. so we’ve added sleep command for checking the logs. or we tried to login to the pod atleast. so i can able to login the pod for now. but still dashboard was not showing.

Attached SS for ur reference. checked ingress-nginx 2 pods are in completed state as well.

Completed is Success. All good.
Error is Failed.

when i check the endpoint url it was throwing 503 error service temporarily unavailable. why ?

check erpnext pods. 7-10 pods be running?

NAME                                       READY   STATUS      RESTARTS        AGE
erpnext-v14-backup-28180800-9lhx6          0/1     Completed   0               32h
erpnext-v14-backup-28181520-nwx2w          0/1     Completed   0               20h
erpnext-v14-backup-28182240-bjgv5          0/1     Completed   0               8h
erpnext-v14-gunicorn-67466895d9-kwmqb      1/1     Running     0               4d23h
erpnext-v14-migrate-20230728150636-lt82z   0/1     Completed   0               4d23h
erpnext-v14-nginx-767c9cd8d9-t5k48         1/1     Running     0               4d23h
erpnext-v14-redis-cache-master-0           1/1     Running     1 (4d23h ago)   6d23h
erpnext-v14-redis-queue-master-0           1/1     Running     0               4d23h
erpnext-v14-redis-socketio-master-0        1/1     Running     0               4d23h
erpnext-v14-scheduler-854bd954d-6lhf4      1/1     Running     0               4d23h
erpnext-v14-socketio-5dd74876c-cqv6v       1/1     Running     0               4d23h
erpnext-v14-worker-d-6bf45dff46-pmkft      1/1     Running     0               4d23h
erpnext-v14-worker-l-7f9668bf48-x6dlx      1/1     Running     0               4d23h
erpnext-v14-worker-s-598b984b54-2xgtm      1/1     Running     0               4d23h

no, i ran the command.
`kubectl -n erpnext apply -f apps/erpnext/configure-kbi-job.yaml’ only one pod has been created. that pod was in completed state.

Note:- using rds database and efs storage driver and redis i’m using local one.

Then you’ve not yet installed the erpnext helm chart as a release?

when i tried to ran this command.
kubectl apply -f .\apps\erpnext\release.yaml
Error from server (BadRequest): error when creating “.\apps\erpnext\release.yaml”: HelmRelease in version “v2beta1” cannot be handled as a HelmRelease: strict decoding error: unknown field “spec.install”, unknown field “spec.interval”, unknown field “spec.values”
so i was removed the “spec.install” “spec.interval” sections kept “spec.values” also failing. paste the error above.

another way i tried:-
According to this article:- Production - K8s Bench Interface

i tried to setup. changed the parameters in values.yaml. all the pods are came. those are in crashloopback state.


The yamls from that repo are fluxcd resources.

You’ll need to take the part under values: from release and make it separate helm values file.

To install helm release, use helm command and not kubectl command

We’ve a long way to go!

What is init container error of conf bench pod?

What is init container error of conf bench pod?:- Attached SS below please refer.

Also as you suggested above:- " take the part under values: from release and make it separate helm values file"
pods came but still it was application pods throughing the crashloopback error. attached SS for pod logs below. Please refer.


and also scheduler pod also same error

and i’m using this image: image: registry.gitlab.com/castlecraft/k8s_bench_interface/bench:14.2.1-0
even i have changed the image instead of 14.2.1 to latest still same error i’m facing. latest image pod logs.

PS C:\Users\SivaSaiGaneshS\Desktop\Roothoot_Files\ERP-K8\aws-eks-erpnext-main> kubectl logs frappe-bench-erpnext-worker-l-7747d7dbbf-bh8rc -n erpnext
Traceback (most recent call last):
 File "<frozen runpy>", line 198, in _run_module_as_main
 File "<frozen runpy>", line 88, in _run_code
 File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 109, in <module>
 File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 16, in main
   commands = get_app_groups()
              ^^^^^^^^^^^^^^^^
 File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 25, in get_app_groups
   for app in get_apps():
              ^^^^^^^^^^
 File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 102, in get_apps
   return frappe.get_all_apps(with_internal_apps=False, sites_path=".")
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1398, in get_all_apps
   apps = get_file_items(os.path.join(sites_path, "apps.txt"), raise_not_found=True)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1564, in get_file_items
   content = read_file(path, raise_not_found=raise_not_found)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1592, in read_file
   raise OSError(f"{path} Not Found")
OSError: b'./apps.txt' Not Found

socket pod logs:-
kubectl logs frappe-bench-erpnext-socketio-6795f8d59c-msd7c -n erpnext
node:events:491
throw er; // Unhandled ‘error’ event
^

Error: connect ECONNREFUSED 127.0.0.1:12311
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)
Emitted ‘error’ event on RedisClient instance at:
at RedisClient.on_error (/home/frappe/frappe-bench/apps/frappe/node_modules/redis/index.js:342:14)
at Socket. (/home/frappe/frappe-bench/apps/frappe/node_modules/redis/index.js:223:14)
at Socket.emit (node:events:513:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -111,
code: ‘ECONNREFUSED’,
syscall: ‘connect’,
address: ‘127.0.0.1’,
port: 12311
}

it’s not the log of initContainer, initContainer is frappe-bench-ownership

ok, i tried 2 ways but still it was not working. pods has throwing errors.