Who gets into ClickHouse,
with which user and from where.
Four scenarios: the administrator's password, login through the company directory, the applications' user, and login through the published URL. Each one covers: what the chart already provides, the values file commented line by line, and a step-by-step with verification.
The ClickHouse from the tdp-clickhouse chart starts with a single user, default, which is the administrator, has a temporary password, and accepts only connections from inside the pod. For applications, the chart can create the tdpuser, which accepts connections from any host. For people, ClickHouse can validate the login against an LDAP or Active Directory. Installation, resources, and exposure are in ClickHouse Configuration.
Your environment
If you fill in your environment details here, the examples and commands on the page use what you entered. The namespace, the release name, and the values file are your choices, not the chart's.
Scenarios
- 1 · Initial credentials
- 2 · Login through LDAP
- 3 · Application user
- 4 · Login through the published URL
Replace the default user's temporary password, in the values file or in a Secret.
This scenario sets the password of default, the ClickHouse administrator user.
ClickHouse is leaving the testing phase and the default user, the administrator, still has the temporary password ChangeMe!T3c, the same default password as the TDP charts. You set yours at installation, in one of two ways: directly in the values file, or in a Secret you create, with the password key, which keeps the password out of the values file.
Temporary, in clickhouse.defaultUser.password. The chart stores it in the <RELEASE_NAME>-credentials Secret.
Only connections from inside the pod.
The default user's password
Where the default user's password lives
- Administration. The default user is the administrator. With the defaults, it signs in only from inside the pod, with clickhouse-client opened through kubectl exec.
- ClickHouse users. The default user is the administrator and accepts only local connections, unless its network is opened. The tdpuser, when enabled, accepts connections from any host. Directory users sign in through the LDAP or Active Directory declared in clickhouse.extraConfig. Chart default:
only default. (clickhouse.defaultUser · clickhouse.tdpUser · clickhouse.extraConfig) - The default user's network. The default user rejects requests from other pods, from an Ingress, or from a Gateway. Chart default:
local only. (clickhouse.extraUsers) - Clients from other pods and from the published URL. Without the tdpuser or a user of your own, no client outside the pod can sign in: the default user rejects them. Chart default:
tdpuser off. (clickhouse.tdpUser.enabled) - Secret with the default user's password. The chart creates this Secret from clickhouse.defaultUser.password. Chart default:
temporary password ChangeMe!T3c. (clickhouse.defaultUser.password) - Directory login. LDAP off. Chart default:
off. (clickhouse.extraConfig)
Where the default user's password lives: In the values file (default)
- Administration. The default user is the administrator. With the defaults, it signs in only from inside the pod, with clickhouse-client opened through kubectl exec.
- ClickHouse users. The default user is the administrator and accepts only local connections, unless its network is opened. The tdpuser, when enabled, accepts connections from any host. Directory users sign in through the LDAP or Active Directory declared in clickhouse.extraConfig. Chart default:
only default. (clickhouse.defaultUser · clickhouse.tdpUser · clickhouse.extraConfig) - The default user's network. The default user rejects requests from other pods, from an Ingress, or from a Gateway. Chart default:
local only. (clickhouse.extraUsers) - Clients from other pods and from the published URL. Without the tdpuser or a user of your own, no client outside the pod can sign in: the default user rejects them. Chart default:
tdpuser off. (clickhouse.tdpUser.enabled) - Secret with the default user's password. The chart creates this Secret from clickhouse.defaultUser.password. Chart default:
temporary password ChangeMe!T3c. (clickhouse.defaultUser.password) - Directory login. LDAP off. Chart default:
off. (clickhouse.extraConfig)
Where the default user's password lives: In your own Secret
- Administration. The default user is the administrator. With the defaults, it signs in only from inside the pod, with clickhouse-client opened through kubectl exec.
- ClickHouse users. The default user is the administrator and accepts only local connections, unless its network is opened. The tdpuser, when enabled, accepts connections from any host. Directory users sign in through the LDAP or Active Directory declared in clickhouse.extraConfig. Chart default:
only default. (clickhouse.defaultUser · clickhouse.tdpUser · clickhouse.extraConfig) - The default user's network. The default user rejects requests from other pods, from an Ingress, or from a Gateway. Chart default:
local only. (clickhouse.extraUsers) - Clients from other pods and from the published URL. Without the tdpuser or a user of your own, no client outside the pod can sign in: the default user rejects them. Chart default:
tdpuser off. (clickhouse.tdpUser.enabled) - Secret with the default user's password. A Secret you created, with the password key, referenced in clickhouse.defaultUser.password_secret_name. The password does not go through the values file. Chart default:
temporary password ChangeMe!T3c. (clickhouse.defaultUser.password_secret_name) - Directory login. LDAP off. Chart default:
off. (clickhouse.extraConfig)
In the values file. Use a private values file. In the values file: Best suited when the values file is private and stays out of Git. It is the default mode.
1tdp-clickhouse:2clickhouse:3 defaultUser:4 password: "<PASSWORD>"
ClickHouse keys live under the chart name.
- Chart prefix (linha 1). ClickHouse keys live under the chart name.
- Default user password (linha 4). Replace the placeholder with your password.
In your own Secret. The password lives in a Secret you create and does not go through the values file. In your own Secret: Best suited when the password must not appear in the values file.
Create the Secret in the ClickHouse namespace, with the password key, before installing:
kubectl -n <NAMESPACE> create secret generic clickhouse-default-password --from-literal=password='<PASSWORD>'
And reference its name in the values file:
1tdp-clickhouse:2clickhouse:3 defaultUser:4 password_secret_name: clickhouse-default-password
The name of the Secret created above. ClickHouse reads the password from the password key, and the password does not go through the values file.
- Password Secret (linha 4). The name of the Secret created above. ClickHouse reads the password from the password key, and the password does not go through the values file.
Apply to the release
The same command installs and upgrades.
helm upgrade --install <RELEASE_NAME> \
oci://registry.tecnisys.com.br/tdp/charts/tdp-clickhouse \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace \
-f <VALUES_FILE>
Connect with the new password
clickhouse-client runs inside the pod, where the default user is accepted.
kubectl -n <NAMESPACE> exec -it chi-<RELEASE_NAME>-<RELEASE_NAME>-0-0-0 -- clickhouse-client --password '<PASSWORD>'
It worked when
clickhouse-client prompt opens with the password you set. The pod name above applies to a release with the recommended name; kubectl -n <NAMESPACE> get pods -l clickhouse.altinity.com/chi shows the real name.People sign in with their company directory account, in an LDAP or an Active Directory.
This scenario enables login through the company directory: people sign in to ClickHouse with their own account, in an LDAP or an Active Directory.
LDAP comes disabled in the chart and is enabled with an XML block in clickhouse.extraConfig, which declares the server and the user directory. In a generic directory, such as OpenLDAP, each person's DN is built from the login. In Active Directory, the bind changes, as the Active Directory option below shows. Directory users receive only the roles listed in the block. Without a role, they sign in but cannot run anything. The chart can create the role. Its databases and grants are granted by hand.
Off. No clickhouse.extraConfig in the chart.
No automatic creation. With clickhouse.ldapRoleInit.enabled, the grants Job creates the clickhouse.ldapRoleInit.role role, without databases or grants. Directory users receive only the roles listed in <roles>: without a role, they sign in but cannot run anything.
Login through the directory
Directory
- Administration. The default user is the administrator. With the defaults, it signs in only from inside the pod, with clickhouse-client opened through kubectl exec.
- ClickHouse users. The default user is the administrator and accepts only local connections, unless its network is opened. The tdpuser, when enabled, accepts connections from any host. Directory users sign in through the LDAP or Active Directory declared in clickhouse.extraConfig. Chart default:
only default. (clickhouse.defaultUser · clickhouse.tdpUser · clickhouse.extraConfig) - The default user's network. The default user rejects requests from other pods, from an Ingress, or from a Gateway. Chart default:
local only. (clickhouse.extraUsers) - Clients from other pods and from the published URL. Without the tdpuser or a user of your own, no client outside the pod can sign in: the default user rejects them. Chart default:
tdpuser off. (clickhouse.tdpUser.enabled) - Secret with the default user's password. The chart creates this Secret from clickhouse.defaultUser.password. Chart default:
temporary password ChangeMe!T3c. (clickhouse.defaultUser.password) - Directory login. LDAP off. Chart default:
off. (clickhouse.extraConfig)
Directory: LDAP
- Administration. The default user is the administrator. With the defaults, it signs in only from inside the pod, with clickhouse-client opened through kubectl exec.
- ClickHouse users. The default user is the administrator and accepts only local connections, unless its network is opened. The tdpuser, when enabled, accepts connections from any host. Directory users sign in through the LDAP or Active Directory declared in clickhouse.extraConfig. Chart default:
only default. (clickhouse.defaultUser · clickhouse.tdpUser · clickhouse.extraConfig) - The default user's network. The default user rejects requests from other pods, from an Ingress, or from a Gateway. Chart default:
local only. (clickhouse.extraUsers) - Clients from other pods and from the published URL. Without the tdpuser or a user of your own, no client outside the pod can sign in: the default user rejects them. Chart default:
tdpuser off. (clickhouse.tdpUser.enabled) - Secret with the default user's password. The chart creates this Secret from clickhouse.defaultUser.password. Chart default:
temporary password ChangeMe!T3c. (clickhouse.defaultUser.password) - Post-install and post-upgrade Job. Runs clickhouse-client as default inside a ClickHouse pod. With clickhouse.ldapRoleInit.enabled, creates the directory role, without databases or grants. (
clickhouse.tdpUser.enabled · clickhouse.ldapRoleInit.enabled) - Directory login. They sign in with their own directory account and receive only the roles listed in <roles>. Without a role, they sign in but cannot run anything. The role's grants are granted by hand. Chart default:
off. (clickhouse.extraConfig) - LDAP. Each person's DN is built from the login, with auth_dn_prefix and auth_dn_suffix. There is no bind account or Secret: each person binds as themselves.
Directory: Active Directory
- Administration. The default user is the administrator. With the defaults, it signs in only from inside the pod, with clickhouse-client opened through kubectl exec.
- ClickHouse users. The default user is the administrator and accepts only local connections, unless its network is opened. The tdpuser, when enabled, accepts connections from any host. Directory users sign in through the LDAP or Active Directory declared in clickhouse.extraConfig. Chart default:
only default. (clickhouse.defaultUser · clickhouse.tdpUser · clickhouse.extraConfig) - The default user's network. The default user rejects requests from other pods, from an Ingress, or from a Gateway. Chart default:
local only. (clickhouse.extraUsers) - Clients from other pods and from the published URL. Without the tdpuser or a user of your own, no client outside the pod can sign in: the default user rejects them. Chart default:
tdpuser off. (clickhouse.tdpUser.enabled) - Secret with the default user's password. The chart creates this Secret from clickhouse.defaultUser.password. Chart default:
temporary password ChangeMe!T3c. (clickhouse.defaultUser.password) - Post-install and post-upgrade Job. Runs clickhouse-client as default inside a ClickHouse pod. With clickhouse.ldapRoleInit.enabled, creates the directory role, without databases or grants. (
clickhouse.tdpUser.enabled · clickhouse.ldapRoleInit.enabled) - Directory login. They sign in with their own directory account and receive only the roles listed in <roles>. Without a role, they sign in but cannot run anything. The role's grants are granted by hand. Chart default:
off. (clickhouse.extraConfig) - Active Directory. Each person binds with their own userPrincipalName. The real DN is resolved afterwards, by user_dn_detection. There is no bind account or Secret.
LDAP. An example for a generic directory, such as OpenLDAP. Replace the values with those of your directory. There is no bind account or Secret: each person binds as themselves. LDAP: Best suited when the directory is generic, such as OpenLDAP, and each person's DN can be built from the login.
1tdp-clickhouse:2clickhouse:3 extraConfig: |4 <yandex>5 <user_directories>6 <ldap>7 <server>tdp_ldap</server>8 <roles>9 <tdp_ldap_role />10 </roles>11 </ldap>12 <local_directory>13 <path>/var/lib/clickhouse/access/</path>14 </local_directory>15 <users_xml>16 <path>users.xml</path>17 </users_xml>18 </user_directories>19 <ldap_servers>20 <tdp_ldap>21 <host>ldap.example.com</host>22 <port>389</port>23 <auth_dn_prefix>uid=</auth_dn_prefix>24 <auth_dn_suffix>,ou=users,dc=example,dc=com</auth_dn_suffix>25 <enable_tls>0</enable_tls>26 </tdp_ldap>27 </ldap_servers>28 </yandex>
The server name declared in ldap_servers, further below.
- Server (linha 7). The server name declared in ldap_servers, further below.
- Assigned role (linha 9). The role directory users receive when they sign in. Without a role, they sign in but cannot run anything.
- Host (linha 21). The company's LDAP server.
- User DN (linha 23). Each person's DN is built with the prefix, the login, and the suffix.
Active Directory. The company directory is an Active Directory (AD). The server in ldap_servers takes two adjustments to the AD format. Active Directory: Best suited when the login is the sAMAccountName and the people's DN is built from the CN.
- Bind by UPN. In AD, the login is the
sAMAccountName, but the DN is built from theCN, so the DN cannot be built withauth_dn_prefixandauth_dn_suffix. Each person binds with their ownuserPrincipalName(sAMAccountName@domain), set in<bind_dn>{user_name}@<AD_DOMAIN></bind_dn>. - Real DN. After the bind, the person's DN is looked up by
sAMAccountName. It serves permissions, not the bind. The lookup is set in<user_dn_detection>, with<base_dn><BASE_DN></base_dn>and<search_filter>(&(objectClass=user)(sAMAccountName={user_name}))</search_filter>.
There is no bind account or Secret, and the role in <roles> is tdp_ldap_role. The complete file is right below, with each line explained.
1tdp-clickhouse:2clickhouse:3 extraConfig: |4 <yandex>5 <user_directories>6 <ldap>7 <server>tdp_ad</server>8 <roles>9 <tdp_ldap_role />10 </roles>11 </ldap>12 <local_directory>13 <path>/var/lib/clickhouse/access/</path>14 </local_directory>15 <users_xml>16 <path>users.xml</path>17 </users_xml>18 </user_directories>19 <ldap_servers>20 <tdp_ad>21 <host><AD_HOST></host>22 <port>389</port>23 <bind_dn>{user_name}@<AD_DOMAIN></bind_dn>24 <user_dn_detection>25 <base_dn><BASE_DN></base_dn>26 <search_filter>(&(objectClass=user)(sAMAccountName={user_name}))</search_filter>27 </user_dn_detection>28 <enable_tls>0</enable_tls>29 </tdp_ad>30 </ldap_servers>31 </yandex>
The server name declared in ldap_servers, further below.
- Server (linha 7). The server name declared in ldap_servers, further below.
- Assigned role (linha 9). The role created by the ldapRoleInit block below. Without a role, people sign in but cannot run anything.
- Host (linha 21). The Active Directory domain controller.
- Bind by UPN (linha 23). Each person binds with sAMAccountName@domain.
- Real DN (linha 24). After the bind, the person's DN is looked up by sAMAccountName. It serves permissions, not the bind.
The directory role. The chart can create the role. Add this block to the same values file, with the name listed in <roles> above. The chart creates only the role. The databases and grants are granted by hand, in the grants step below.
1tdp-clickhouse:2clickhouse:3 ldapRoleInit:4 enabled: true5 role: tdp_ldap_role
The grants Job creates the role after the installation and after every upgrade, without databases or grants.
- Creates the role (linha 4). The grants Job creates the role after the installation and after every upgrade, without databases or grants.
- Role name (linha 5). The same name listed in <roles> in extraConfig.
Apply to the release
The same command installs and upgrades.
helm upgrade --install <RELEASE_NAME> \
oci://registry.tecnisys.com.br/tdp/charts/tdp-clickhouse \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace \
-f <VALUES_FILE>
Grant privileges to the role
As default, inside the pod. Only the databases directory users should see.
-- Optional if ldapRoleInit.enabled=true
CREATE ROLE IF NOT EXISTS tdp_ldap_role;
-- Optional grants (apply only if you want access)
-- GRANT ALL ON tdp.* TO tdp_ldap_role;
-- GRANT SELECT ON default.* TO tdp_ldap_role;
-- GRANT SELECT ON system.* TO tdp_ldap_role;
It worked when
The tdpuser for the platform components, or a user of your own with fewer privileges.
This scenario creates the user that applications use to connect to ClickHouse.
Applications and tools in other pods, such as Trino, Superset, and CloudBeaver, need a user that accepts connections from outside the pod, and the default user does not. The chart can create one for them, the tdpuser, which comes disabled. When enabled, it accepts connections from any host and receives all privileges. For a client with access only to what it needs, create a user of your own, with fewer privileges.
Off (clickhouse.tdpUser.enabled). When enabled, the chart stores the clickhouse.tdpUser.password password in the tdp-clickhouse-tdp-user Secret, under the password key.
After the installation and after every upgrade, a Job runs clickhouse-client as default inside a ClickHouse pod, creates the tdpuser, and grants ALL ... WITH GRANT OPTION, access management, named collections, and SYSTEM. On every upgrade, it resets the tdpuser password to the current value: changing clickhouse.tdpUser.password and upgrading the release changes the user's password.
Temporary, ChangeMe!T3c. With the tdpuser enabled and an empty password, rendering fails.
The tdpuser for applications
- Administration. The default user is the administrator. With the defaults, it signs in only from inside the pod, with clickhouse-client opened through kubectl exec.
- ClickHouse users. The default user is the administrator and accepts only local connections, unless its network is opened. The tdpuser, when enabled, accepts connections from any host. Directory users sign in through the LDAP or Active Directory declared in clickhouse.extraConfig. Chart default:
only default. (clickhouse.defaultUser · clickhouse.tdpUser · clickhouse.extraConfig) - The default user's network. The default user rejects requests from other pods, from an Ingress, or from a Gateway. Chart default:
local only. (clickhouse.extraUsers) - Clients from other pods and from the published URL. They sign in with the tdpuser, or with a user you created with fewer privileges. Chart default:
tdpuser off. (clickhouse.tdpUser.enabled) - Secret with the default user's password. The chart creates this Secret from clickhouse.defaultUser.password. Chart default:
temporary password ChangeMe!T3c. (clickhouse.defaultUser.password) - Post-install and post-upgrade Job. Runs clickhouse-client as default inside a ClickHouse pod. Creates the tdpuser, or resets its password on every upgrade, and grants all privileges. (
clickhouse.tdpUser.enabled · clickhouse.ldapRoleInit.enabled) - The tdpuser's Secret. The chart stores the clickhouse.tdpUser.password password here, under the password key. Rendering fails with an empty password. Chart default:
temporary password ChangeMe!T3c. (clickhouse.tdpUser.password) - Directory login. LDAP off. Chart default:
off. (clickhouse.extraConfig)
1tdp-clickhouse:2clickhouse:3 tdpUser:4 enabled: true5 password: "<PASSWORD>"
The chart creates the password Secret and the Job that creates the user.
- Enables the tdpuser (linha 4). The chart creates the password Secret and the Job that creates the user.
- Password (linha 5). Set yours in a private values file. Empty, rendering fails.
Apply to the release
The grants Job runs after the installation or the upgrade.
helm upgrade --install <RELEASE_NAME> \
oci://registry.tecnisys.com.br/tdp/charts/tdp-clickhouse \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace \
-f <VALUES_FILE>
Check the user and the privileges
As default, inside the pod.
kubectl -n <NAMESPACE> exec -it chi-<RELEASE_NAME>-<RELEASE_NAME>-0-0-0 -- clickhouse-client --password '<PASSWORD>' --query "SHOW GRANTS FOR tdpuser"
It worked when
tdpuser privileges.If the tdpuser does not exist
The Job waits for a ready pod behind the clickhouse-<RELEASE_NAME> Service. See When something goes wrong.
Configure the clients
Each client uses the Service address and the tdpuser.
Clients in other pods connect to the Service with the tdpuser, through the port of the interface they use:
# HTTP
clickhouse-<RELEASE_NAME>.<NAMESPACE>.svc.cluster.local:8123
# Native
clickhouse-<RELEASE_NAME>.<NAMESPACE>.svc.cluster.local:9000
The platform components that query ClickHouse are in Integrations - ClickHouse.
For a client with fewer privileges, create a user of your ownOpcional
As default, inside the pod, with only the grants the client needs.
CREATE USER app IDENTIFIED BY '<PASSWORD>' HOST ANY;
GRANT SELECT ON mydb.* TO app;
Which user signs in through the Play UI published on an Ingress or Gateway.
This scenario chooses the user that signs in to ClickHouse through the URL published on an Ingress or a Gateway.
You published the Play UI and the HTTP interface on an Ingress or a Gateway, as in scenario 4 of ClickHouse Configuration, and the login with default fails. Requests that arrive through an Ingress or a Gateway are not local, and the default user rejects them, with AUTHENTICATION_FAILED or IP_ADDRESS_NOT_ALLOWED in the ClickHouse log. Sign in with a user that accepts any host, such as the tdpuser. Opening the default user's own network is also possible, but then anyone who can reach the host can try to sign in as administrator.
Who answers on the published URL
Who signs in through the URL
- Administration. The default user is the administrator. With the defaults, it signs in only from inside the pod, with clickhouse-client opened through kubectl exec.
- ClickHouse users. The default user is the administrator and accepts only local connections, unless its network is opened. The tdpuser, when enabled, accepts connections from any host. Directory users sign in through the LDAP or Active Directory declared in clickhouse.extraConfig. Chart default:
only default. (clickhouse.defaultUser · clickhouse.tdpUser · clickhouse.extraConfig) - The default user's network. The default user rejects requests from other pods, from an Ingress, or from a Gateway. Chart default:
local only. (clickhouse.extraUsers) - Clients from other pods and from the published URL. Without the tdpuser or a user of your own, no client outside the pod can sign in: the default user rejects them. Chart default:
tdpuser off. (clickhouse.tdpUser.enabled) - Secret with the default user's password. The chart creates this Secret from clickhouse.defaultUser.password. Chart default:
temporary password ChangeMe!T3c. (clickhouse.defaultUser.password) - Directory login. LDAP off. Chart default:
off. (clickhouse.extraConfig)
Who signs in through the URL: tdpuser
- Administration. The default user is the administrator. With the defaults, it signs in only from inside the pod, with clickhouse-client opened through kubectl exec.
- ClickHouse users. The default user is the administrator and accepts only local connections, unless its network is opened. The tdpuser, when enabled, accepts connections from any host. Directory users sign in through the LDAP or Active Directory declared in clickhouse.extraConfig. Chart default:
only default. (clickhouse.defaultUser · clickhouse.tdpUser · clickhouse.extraConfig) - The default user's network. The default user rejects requests from other pods, from an Ingress, or from a Gateway. Chart default:
local only. (clickhouse.extraUsers) - Clients from other pods and from the published URL. They sign in with the tdpuser, or with a user you created with fewer privileges. Chart default:
tdpuser off. (clickhouse.tdpUser.enabled) - Secret with the default user's password. The chart creates this Secret from clickhouse.defaultUser.password. Chart default:
temporary password ChangeMe!T3c. (clickhouse.defaultUser.password) - Post-install and post-upgrade Job. Runs clickhouse-client as default inside a ClickHouse pod. Creates the tdpuser, or resets its password on every upgrade, and grants all privileges. (
clickhouse.tdpUser.enabled · clickhouse.ldapRoleInit.enabled) - The tdpuser's Secret. The chart stores the clickhouse.tdpUser.password password here, under the password key. Rendering fails with an empty password. Chart default:
temporary password ChangeMe!T3c. (clickhouse.tdpUser.password) - Directory login. LDAP off. Chart default:
off. (clickhouse.extraConfig)
Who signs in through the URL: default, with the network open
- Administration. The default user is the administrator. With the defaults, it signs in only from inside the pod, with clickhouse-client opened through kubectl exec.
- ClickHouse users. The default user is the administrator and accepts only local connections, unless its network is opened. The tdpuser, when enabled, accepts connections from any host. Directory users sign in through the LDAP or Active Directory declared in clickhouse.extraConfig. Chart default:
only default. (clickhouse.defaultUser · clickhouse.tdpUser · clickhouse.extraConfig) - The default user's network. The default user's network was opened with clickhouse.extraUsers: anyone who can reach the host can try to sign in as administrator. Only with a strong password. Chart default:
local only. (clickhouse.extraUsers) - Clients from other pods and from the published URL. They sign in with the default user, open to any host. Chart default:
tdpuser off. (clickhouse.tdpUser.enabled) - Secret with the default user's password. The chart creates this Secret from clickhouse.defaultUser.password. Chart default:
temporary password ChangeMe!T3c. (clickhouse.defaultUser.password) - Directory login. LDAP off. Chart default:
off. (clickhouse.extraConfig)
tdpuser. Enable the tdpuser as in scenario 3 and sign in with it through the URL. The default user's network stays closed. tdpuser: Best suited when whoever signs in through the URL does not need to be the administrator.
default, with the network open. Only with a strong password, set as in scenario 1. default, with the network open: Best suited when you need to sign in through the URL as the administrator.
The block replaces the chart's entire extraUsers, so it repeats the chart's <profiles> block.
1tdp-clickhouse:2clickhouse:3 extraUsers: |4 <yandex>5 <profiles>6 <default>7 <query_cache_system_table_handling>ignore</query_cache_system_table_handling>8 </default>9 </profiles>10 <users>11 <default>12 <networks>13 <ip>::/0</ip>14 </networks>15 </default>16 </users>17 </yandex>
A single XML block: yours replaces the chart's entirely.
- extraUsers (linha 3). A single XML block: yours replaces the chart's entirely.
- Chart profiles (linha 5). The block the chart's extraUsers already carries. Repeat it.
- Any network (linha 13). Opens the default user to any address. Anyone who can reach the host can try to sign in as administrator.
Apply to the release
The same command installs and upgrades.
helm upgrade --install <RELEASE_NAME> \
oci://registry.tecnisys.com.br/tdp/charts/tdp-clickhouse \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace \
-f <VALUES_FILE>
It worked when
http://<CLICKHOUSE_HOSTNAME>/play accepts the chosen user.When something goes wrong
Troubleshooting
Paste the error message or pick the symptom. The answer comes with the cause, what to do, and the command.
- Rendering error: tdpUser.password is required. Cause: The tdpuser is enabled with an empty password. What to do: Set clickhouse.tdpUser.password in a private values file and apply again.
- AUTHENTICATION_FAILED or IP_ADDRESS_NOT_ALLOWED. Cause: The client signed in as default from outside the pod: from another pod, from an Ingress, or from a Gateway. The default user accepts only local connections. What to do: Use the tdpuser or a user of your own, as in scenarios 3 and 4.
- The tdpuser does not exist or the new password does not work. Cause: The grants Job runs after the installation and after every upgrade and waits for a ready pod behind the clickhouse-<RELEASE_NAME> Service. If the Service has a different name, or the pods do not become ready, the Job never creates the user. What to do: Check the real names of the ClickHouseInstallation, the pods, and the Service, and the Job logs while it exists.
- The person signs in through the directory but cannot run anything. Cause: Directory users receive only the roles listed in <roles>, and the role is created without databases or grants. Without a role, or with a role that has no grants, the person signs in but cannot run anything. What to do: Check the role in <roles> and the ldapRoleInit block, and grant privileges to the role as default, as in the grants step of scenario 2.
- Another problem. Cause: Start with the logs of the ClickHouse pods. What to do: The ClickHouse pods carry the ClickHouseInstallation label.
Best practices
- Replace the temporary passwords of
defaultandtdpuserbefore using the cluster for anything beyond testing, and keep them in a private values file or, fordefault, in a Secret. - Use
defaultonly for administration, from inside the pod. Applications and tools sign in with thetdpuseror with a user of their own. - For a client that needs only part of the data, create a user with only the necessary grants, instead of the
tdpuser. - Open the
defaultuser's network only with a strong password.
All parameters
Filter by name or by group. The chart prefix is already filled in.
8 of 8 parameters
| Parameter | Description | Chart default |
|---|---|---|
tdp-clickhouse.clickhouse.defaultUser.passwordAdministrator | Temporary password of the default user (replace it) | ChangeMe!T3c |
tdp-clickhouse.clickhouse.defaultUser.password_secret_nameAdministrator | Your own Secret, with the password key, in place of defaultUser.password | "" |
tdp-clickhouse.clickhouse.tdpUser.enabledApplications | Creates the tdpuser (any host, full privileges) through a post-install Job | false |
tdp-clickhouse.clickhouse.tdpUser.passwordApplications | Temporary password of the tdpuser (replace it; empty fails the rendering) | ChangeMe!T3c |
tdp-clickhouse.clickhouse.extraUsersUsers | Additional users and profiles (XML). Replaces the chart's entire block | <profiles> block of the default profile |
tdp-clickhouse.clickhouse.extraConfigDirectory | Additional server configuration (XML), with <ldap_servers> and <user_directories> | not defined |
tdp-clickhouse.clickhouse.ldapRoleInit.enabledDirectory | Creates the directory role, without databases or grants | not defined |
tdp-clickhouse.clickhouse.ldapRoleInit.roleDirectory | Name of the created role | not defined (example: tdp_ldap_role) |
Next steps
Configuration
ClickHouse Configuration
Installation, resources, shards and replicas, and external exposure.