Closed zainal-abidin-assegaf closed 4 years ago
@4ss3g4f , operator secures cluster from outside access. You need to open up default user explicitly. It can be done via ClickHouse installation resource. For example:
spec:
configuration:
users:
default/networks/ip: "::/0"
@alex-zaitsev , we used your recommendation,
apiVersion: "clickhouse.altinity.com/v1"
kind: "ClickHouseInstallation"
metadata:
name: "repl-05"
spec:
defaults:
templates:
dataVolumeClaimTemplate: default
podTemplate: clickhouse:19.6
configuration:
users:
default/networks/ip: "::/0"
zookeeper:
nodes:
- host: zookeeper.zoons.svc.cluster.local
clusters:
- name: replicated
layout:
shardsCount: 6
replicasCount: 6
templates:
volumeClaimTemplates:
- name: default
spec:
accessModes:
- ReadWriteOnce
storageClassName: rook-ceph-block
resources:
requests:
storage: 100Gi
podTemplates:
- name: clickhouse:19.6
spec:
containers:
- name: clickhouse-pod
image: yandex/clickhouse-server:19.6.2.11
And have successful result,
Thank you
We have deployed clickhouse on kubernetes, with detail :
and we can access clickhouse from command line:
core@manager-02 ~ $ cat clickhouse.sh
#! /usr/bin/bash
sudo kubectl exec -it $(sudo kubectl get pod -l clickhouse.altinity.com/app=chop -o jsonpath='{.items[0].metadata.name}' ) -- clickhouse-client
but tabix can not access clickhouse due to user default do not configured with any passwod, from documentation we need to allow 0.0.0.0:8123 and give it password from xml file, in kubernetes we can not change xml, because if kubernetes destroy and re-create clickhouse pod we will loose the password again
so how to resolve this issue ??
we want to ingest data to clickhouse kubernetes via pentaho also, but also can not connect:
`Error connecting to database [clickhouse] :org.pentaho.di.core.exception.KettleDatabaseException: Error occurred while trying to connect to the database
Error connecting to database: (using class ru.yandex.clickhouse.ClickHouseDriver) ru.yandex.clickhouse.except.ClickHouseException: ClickHouse exception, code: 195, host: 10.9.56.132, port: 8123; Code: 195, e.displayText() = DB::Exception: User default is not allowed to connect from address 10.244.34.0 (version 19.6.2.11 (official build))
org.pentaho.di.core.exception.KettleDatabaseException: Error occurred while trying to connect to the database
Error connecting to database: (using class ru.yandex.clickhouse.ClickHouseDriver) ru.yandex.clickhouse.except.ClickHouseException: ClickHouse exception, code: 195, host: 10.9.56.132, port: 8123; Code: 195, e.displayText() = DB::Exception: User default is not allowed to connect from address 10.244.34.0 (version 19.6.2.11 (official build))
Caused by: org.pentaho.di.core.exception.KettleDatabaseException: Error connecting to database: (using class ru.yandex.clickhouse.ClickHouseDriver) ru.yandex.clickhouse.except.ClickHouseException: ClickHouse exception, code: 195, host: 10.9.56.132, port: 8123; Code: 195, e.displayText() = DB::Exception: User default is not allowed to connect from address 10.244.34.0 (version 19.6.2.11 (official build))
Caused by: java.lang.RuntimeException: ru.yandex.clickhouse.except.ClickHouseException: ClickHouse exception, code: 195, host: 10.9.56.132, port: 8123; Code: 195, e.displayText() = DB::Exception: User default is not allowed to connect from address 10.244.34.0 (version 19.6.2.11 (official build))
Caused by: ru.yandex.clickhouse.except.ClickHouseException: ClickHouse exception, code: 195, host: 10.9.56.132, port: 8123; Code: 195, e.displayText() = DB::Exception: User default is not allowed to connect from address 10.244.34.0 (version 19.6.2.11 (official build))
Caused by: java.lang.Throwable: Code: 195, e.displayText() = DB::Exception: User default is not allowed to connect from address 10.244.34.0 (version 19.6.2.11 (official build))
Custom URL: jdbc:clickhouse://10.9.56.132:8123/database Custom Driver Class: ru.yandex.clickhouse.ClickHouseDriver
`
clickhouse kubernetes service loadbalancer ip 10.9.56.132 , need you help and recommendation how to resolve this,
Thank you