[英]Superset on Kubernetes with Helm not using custom values file
我正在嘗試使用 Helm 並按照此處描述的官方程序在 Kubernetes 集群(AWS EKS)上安裝 Apache Superset。
bash-3.2$ helm repo add superset https://apache.github.io/superset
"superset" has been added to your repositories
bash-3.2$ helm search repo superset
NAME CHART VERSION APP VERSION DESCRIPTION
superset/superset 0.1.2 1.0 Apache Superset is a modern, enterprise-ready b...
由於我想分別對數據庫和緩存使用 RDS 和 ElastiCache,而不是捆綁的 postgresql 和 redis,我需要覆蓋默認值中的幾個值values.yaml
bash-3.2$ helm show values superset/superset > custom-values.yaml
編輯了幾個部分,例如
postgresql:
##
## Use the PostgreSQL chart dependency.
## Set to false if bringing your own PostgreSQL.
enabled: false
[...]
##
## If you are bringing your own PostgreSQL, you should set postgresHost and
## also probably service.port, postgresqlUsername, postgresqlPassword, and postgresqlDatabase
postgresHost: myproject.cluster-xxxxxxxxx.us-east-2.rds.amazonaws.com
和其他人,並安裝了我的發行版
bash-3.2$ helm upgrade --install --values custom-values.yaml superset superset/superset
如指南中所述。
前三個 pod 已創建:
bash-3.2$ kubectl get pods
NAME READY STATUS RESTARTS AGE
superset-7d96fc8787-vr6c6 0/1 Init:0/1 0 3m4s
superset-init-db-xqmd9 0/1 Init:0/1 0 3m3s
superset-worker-7fff4f497b-cnqs5 0/1 Init:0/1 0 3m4s
但隨后什么也沒有發生。 登錄到superset-init
pod 的init-container
我發現等待數據庫可用的進程被卡住了,因為它使用的是默認環境變量,而不是我在custom-values.yaml
文件中提供的那些:
bash-3.2$ kubectl exec -it --container wait-for-postgres superset-init-db-xqmd9 -- sh
/ #
/ # env
REDIS_PORT=6379
KUBERNETES_PORT=tcp://172.20.0.1:443
KUBERNETES_SERVICE_PORT=443
HOSTNAME=superset-init-db-xqmd9
DB_PORT=5432
SUPERSET_PORT=tcp://172.20.72.4:8088
SUPERSET_SERVICE_PORT=8088
SUPERSET_PORT_8088_TCP_ADDR=172.20.72.4
SHLVL=1
HOME=/root
DB_NAME=superset
SUPERSET_PORT_8088_TCP_PORT=8088
SUPERSET_PORT_8088_TCP_PROTO=tcp
SUPERSET_PORT_8088_TCP=tcp://172.20.72.4:8088
TERM=xterm
KUBERNETES_PORT_443_TCP_ADDR=172.20.0.1
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
KUBERNETES_PORT_443_TCP_PORT=443
KUBERNETES_PORT_443_TCP_PROTO=tcp
DB_PASS=superset
SUPERSET_SERVICE_PORT_HTTP=8088
KUBERNETES_SERVICE_PORT_HTTPS=443
KUBERNETES_PORT_443_TCP=tcp://172.20.0.1:443
REDIS_HOST=superset-redis-headless
KUBERNETES_SERVICE_HOST=172.20.0.1
PWD=/
DB_HOST=superset-postgresql
SUPERSET_SERVICE_HOST=172.20.72.4
DB_USER=superset
編輯:
custom-values.yaml
文件中的一些自定義值實際上用於覆蓋默認值。 例如:
service:
type: LoadBalancer
代替
service:
type: ClusterIP
還有 postgresql 和 redis pod 在我將它們設置為enabled: false
但由於某種原因,其他自定義值未應用或傳遞給 pod 的秘密存儲環境變量。
我究竟做錯了什么?
根據超集的values.yaml的值,我確實看到您是否帶了自己的 Postgres 實例,從上述問題中我了解到,您必須更改這些值
supersetNode:
connections:
# Change incase bringing your own redis and then also make `redis.enabled`:false
redis_host: '{{ template "superset.fullname" . }}-redis-headless'
redis_port: "6379"
# You need to change below configuration incase bringing own pg instance and as you made `postgresql.enabled`:false that's correct incase bringing own pg instance
db_host: <YOUR RDS PG HOST>
db_port: "5432"
db_user: <YOUR DB USER>
db_pass: <YOUR DB PASS>
db_name: <YOUR DB NAME | postgres>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.