Resources

Share this on Social Media: Twitter  Facebook   LinkIn
clickhouse-operator Resources Details

The clickhouse-operator creates the following resources on installation to support its functions:

  • Custom Resource Definition
  • Service account
  • Cluster Role Binding
  • Deployment

Custom Resource Definition

The Kubernetes k8s API is extended with the new Kubernetes Cluster Resource Definition kind:ClickHouseInstallation.

To check the Custom Resource Definition:

kubectl get customresourcedefinitions

Expected result:

NAME                                                       CREATED AT
clickhouseinstallations.clickhouse.altinity.com            2020-12-28T19:28:08Z
clickhouseinstallationtemplates.clickhouse.altinity.com    2020-12-28T19:28:08Z
clickhouseoperatorconfigurations.clickhouse.altinity.com   2020-12-28T19:28:08Z

Service Account

The new Service Account clickhouse-operator allows services running from within Pods to be authenticated against the Service Account clickhouse-operator through the apiserver.

To check the Service Account:

kubectl get serviceaccounts -n kube-system

Expected result

NAME                                 SECRETS   AGE
(Other Service Accounts)
clickhouse-operator                  1         27h
(Other Service Accounts)

Cluster Role Binding

The Cluster Role Binding cluster-operator grants permissions defined in a role to a set of users.

Roles are granted to users, groups or service account. These permissions are granted cluster-wide with ClusterRoleBinding.

To check the Cluster Role Binding:

kubectl get clusterrolebinding

Expected result

NAME                               ROLE                         AGE
(Other Cluster Role Bindings)
clickhouse-operator-kube-system    ClusterRole/cluster-admin    90m
(Other Cluster Role Bindings)

Cluster Role Binding Example

As an example, the role cluster-admin is granted to a service account cliskhouse-operator:

roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
  - kind: ServiceAccount
    name: clickhouse-operator
    namespace: kube-system

Deployment

The Deployment clickhouse-operator runs in the kube-system namespace.

To check the Deployment:

kubectl get deployments --namespace kube-system

Expected result

NAME                  READY   UP-TO-DATE   AVAILABLE   AGE
(Other Deployments)
clickhouse-operator   1/1     1            1           96m
(Other Deployments)

References

Last modified 2021.01.28: Cascade docs tweak.