如标题所示,我尝试在Digital Ocean托管的Kubernetes上运行Apache Druid。我在Minikube上本地运行了这个配置,并且运行良好,但是当我将集群切换到Digital Ocean时,在尝试创建/var/druid
时,每个pod上都出现Access Denied错误。
服务:
apiVersion: v1
kind: Service
metadata:
name: router
labels:
app: router
spec:
ports:
- port: 8888
selector:
app: router
持续体积声明:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: router
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
status: {}
和部署:
apiVersion: apps/v1
kind: Deployment
metadata:
name: router
spec:
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 2
maxUnavailable: 1
selector:
matchLabels:
app: druid
replicas: 3
template:
metadata:
labels:
app: druid
spec:
containers:
- name: router
image: apache/druid:24.0.2
args:
- router
env:
- name: AWS_REGION
value: us-west-2
- name: DRUID_LOG4J
value: <?xml version="1.0" encoding="UTF-8" ?><Configuration status="WARN"><Appenders><Console name="Console" target="SYSTEM_OUT"><PatternLayout pattern="%d{ISO8601} %p [%t] %c - %m%n"/></Console></Appenders><Loggers><Root level="info"><AppenderRef ref="Console"/></Root><Logger name="org.apache.druid.jetty.RequestLog" additivity="false" level="DEBUG"><AppenderRef ref="Console"/></Logger></Loggers></Configuration>
- name: DRUID_SINGLE_NODE_CONF
value: micro-quickstart
- name: druid_coordinator_balancer_strategy
value: cachingCost
- name: druid_emitter_logging_logLevel
value: debug
- name: druid_extensions_loadList
value: '["druid-histogram", "druid-datasketches", "druid-lookups-cached-global", "postgresql-metadata-storage", "druid-multi-stage-query", "druid-s3-extensions", "druid-parquet-extensions"]'
- name: druid_indexer_fork_property_druid_processing_buffer_sizeBytes
value: 256MiB
- name: druid_indexer_logs_directory
value: /opt/shared/indexing-logs
- name: druid_indexer_logs_type
value: file
- name: druid_indexer_runner_javaOptsArray
value: '["-server", "-Xmx1g", "-Xms1g", "-XX:MaxDirectMemorySize=3g", "-Duser.timezone=UTC", "-Dfile.encoding=UTF-8", "-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager", "-Daws.region=us-west-2"]'
- name: druid_metadata_storage_connector_connectURI
value: jdbc:postgresql://postgres.druid.svc.cluster.local:5432/druid
- name: druid_metadata_storage_connector_password
value: FoolishPassword
- name: druid_metadata_storage_connector_user
value: druid
- name: druid_metadata_storage_host
- name: druid_metadata_storage_type
value: postgresql
- name: druid_processing_numMergeBuffers
value: "2"
- name: druid_processing_numThreads
value: "2"
- name: druid_storage_storageDirectory
value: /opt/shared/segments
- name: druid_storage_type
value: local
- name: druid_zk_service_host
value: zk-cs.druid.svc.cluster.local
ports:
- containerPort: 8888
volumeMounts:
- mountPath: /opt/druid/var
name: router
resources:
limits:
memory: "512Mi"
cpu: "500m"
restartPolicy: Always
volumes:
- name: router
persistentVolumeClaim:
claimName: router
我对Druid和Kubernetes非常陌生,所以我肯定有些是不正确的,但是这项工作的范围实际上只是让配置工作,因为它在本地,在DO上。谷歌建议一些关于Druid版本是不正确的-很多关于Docker编写的问题。这些似乎都没有很大的帮助,因为它**工作在Minikube上,版本没有改变。
1条答案
按热度按时间vjhs03f71#
IIRC micro quickstart使用本地深层存储,除非您有NFS,否则无法在kube解决方案上工作。您可能需要配置深层存储https://druid.apache.org/docs/latest/tutorials/cluster.html#deep-storage
你的Druid版本对我来说似乎是正确的。