Search code examples
databasedistributed-databaseyugabytedb

How do I perform the k8s/helm setup of YB?


I am trying the k8s/helm setup of YB via:

% helm install yugabyte -f expose-all.yaml --namespace yb-demo --name yb-demo --wait

After that, how do I interact with the cluster via YCQL (say a cqlsh). Essentially, I want to access the db from an external program.


Solution

  • For starters, one can exec into a yb-tserver container and run the packaged cqlsh to get access to the shell. For example:

    kubectl exec -it yb-tserver-0 /home/yugabyte/bin/cqlsh
    

    To connect an external program, one needs to get the YCQL service load balancer end point. The command to get the service info and sample output is as below:

    $ kubectl get services --all-namespaces
    NAMESPACE     NAME                   TYPE           CLUSTER-IP      EXTERNAL-IP      PORT(S)                                        AGE
    ...
    yb-demo       yql-service            LoadBalancer   10.47.249.27    35.225.153.213   9042:30940/TCP                                 2m
    

    So any program can use the EXTERNAL-IP of the yql-service to connect to YugaByte DB using YCQL.

    Thanks for the question! We will update our docs as well to reflect these options.