Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue with installing apache superset on EKS [closed]

I have created an EKS cluster with ALB setup. I tried installing superset by following the steps provided in https://superset.apache.org/docs/installation/running-on-kubernetes/

my-values.yaml

ingress:
  enabled: true
  ingressClassName: ~
  annotations:
    kubernetes.io/ingress.class: alb
    alb.ingress.kubernetes.io/scheme: internet-facing
    alb.ingress.kubernetes.io/target-type: instance
    # kubernetes.io/tls-acme: "true"
    ## Extend timeout to allow long running queries.
    # nginx.ingress.kubernetes.io/proxy-connect-timeout: "300"
    # nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
    # nginx.ingress.kubernetes.io/proxy-send-timeout: "300"
  path: /
  pathType: ImplementationSpecific
  hosts:
    - chart-example.local
  tls: []
  extraHostsRaw: []
  #  - secretName: chart-example-tls
  #    hosts:
  #      - chart-example.local

When I am running helm upgrade --install --values my-values.yaml superset superset/superset --timeout 10m30s, it takes a lot of time and returns

Error: UPGRADE FAILED: post-upgrade hooks failed: 1 error occurred:
    * timed out waiting for the condition

and when I run

[ec2-user@ip-1**-**-**-*** ~]$ kubectl get pods
NAME                               READY   STATUS       RESTARTS        AGE
superset-7866fcc8b4-tcpk4          0/1     Init:0/1     8 (6m53s ago)   33m
superset-init-db-6q9dp             0/1     Init:Error   0               5m24s
superset-init-db-7hqz4             0/1     Init:Error   0               7m48s
superset-init-db-jt87x             0/1     Init:Error   0               12m
superset-init-db-rt85r             0/1     Init:Error   0               10m
superset-init-db-zptz6             0/1     Init:Error   0               2m40s
superset-postgresql-0              0/1     Pending      0               33m
superset-redis-master-0            1/1     Running      0               33m
superset-worker-748db75bf7-9kzfp   0/1     Init:0/1     8 (6m56s ago)   33m

I am new to kubernetes and this is new to me. Please help!

Edit:1 Added EBS CSI driver and Storage Class and went ahead with superset installation. Ran the following commands. Attaching responses

kubectl get pods
    NAME                               READY   STATUS     RESTARTS       AGE
    superset-7866fcc8b4-q59nd          0/1     Init:0/1   4 (109s ago)   13m
    superset-init-db-gq9b9             0/1     Pending    0              13m
    superset-postgresql-0              0/1     Pending    0              13m
    superset-redis-master-0            1/1     Running    0              13m
    superset-worker-748db75bf7-n7t2r   0/1     Init:0/1   5 (91s ago)    13m

[ec2-user@ip-172-31-23-209 ~]$ kubectl logs superset-worker-748db75bf7-n7t2r
Defaulted container "superset" out of: superset, wait-for-postgres-redis (init)
Error from server (BadRequest): container "superset" in pod "superset-worker-748db75bf7-n7t2r" is waiting to start: PodInitializing

[ec2-user@ip-172-31-23-209 ~]$ kubectl logs superset-7866fcc8b4-q59nd
Defaulted container "superset" out of: superset, wait-for-postgres (init)
Error from server (BadRequest): container "superset" in pod "superset-7866fcc8b4-q59nd" is waiting to start: PodInitializing

kubectl describe pod superset-postgresql-0
Events:
  Type     Reason            Age                  From               Message
  ----     ------            ----                 ----               -------
  Warning  FailedScheduling  4m20s (x4 over 16m)  default-scheduler  0/1 nodes are available: 1 Too many pods. preemption: 0/1 nodes are available: 1 No preemption victims found for incoming pod.
like image 202
Rohit Anil Avatar asked Oct 15 '25 02:10

Rohit Anil


2 Answers

If you're running PostgreSQL, and you're using EKS 1.23 or higher, you'll need to install a CSI driver, e.g. the EBS CSI driver. Starting with 1.23, EKS no longer ships with a storage driver (the in-tree driver was deprecated). After installing the CSI driver, create a default storage class. Your pods should start shortly thereafter. If you're new to Kubernetes, I'd recommend installing the CSI driver through EKS addons.

like image 159
Jeremy Cowan Avatar answered Oct 17 '25 18:10

Jeremy Cowan


You got to inspect the logs of these pods; to see why it is failing; But initially, seems

  • Postgres bitnami chart has to be installed as part of superset installation process.
  • For some reason, postgres pod is pending (most probably because it cannot create a persistent volume; might be something else). You can know by running kubectl describe pod superset-postgresql-0 and kubectl logs superset-init-db-6q9dp -c init
  • Superset pods cannot start until the postgres is up, which make sense to have it in the init container of your pod not to start your app unless DB is ready. You can inspect that by running logs on one of the logs kubectl logs superset-7866fcc8b4-tcpk4 -c init.

That is my guess; You can know for sure by following the above kubectl commands I provided.

Long story short, superset installation to work needs to have postgres started as per of init checks before it actually starts; postgres is not, that's why superset is failing. Why postgres is not starting ? Check the logs.

like image 20
Abraam Magued Avatar answered Oct 17 '25 18:10

Abraam Magued



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!