Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

K8SSAND-134 ⁃ The k8ssandra-cluster chart instructions should say how to access the super user credentials #77

Closed
jdonenine opened this issue Nov 24, 2020 · 2 comments

Comments

@jdonenine
Copy link
Contributor

jdonenine commented Nov 24, 2020

Is your feature request related to a problem? Please describe.
After installing, additional context should be provided on the command line w.r.t. accessing the credentials

Describe the solution you'd like
At the end of helm install or helm upgrade helm can instructions and other info for the user. This customized using the templates/NOTES.txt file.

Here is example output from installing mysql:

$ helm install stable/mysql --generate-name
NAME: mysql-1602951452
LAST DEPLOYED: Sat Oct 17 12:17:34 2020
NAMESPACE: default
STATUS: deployed
REVISION: 1
NOTES:
MySQL can be accessed via port 3306 on the following DNS name from within your cluster:
mysql-1602951452.default.svc.cluster.local

To get your root password run:

    MYSQL_ROOT_PASSWORD=$(kubectl get secret --namespace default mysql-1602951452 -o jsonpath="{.data.mysql-root-password}" | base64 --decode; echo)

To connect to your database:

1. Run an Ubuntu pod that you can use as a client:

    kubectl run -i --tty ubuntu --image=ubuntu:16.04 --restart=Never -- bash -il

2. Install the mysql client:

    $ apt-get update && apt-get install mysql-client -y

3. Connect using the mysql cli, then provide your password:
    $ mysql -h mysql-1602951452 -p

To connect to your database directly from outside the K8s cluster:
    MYSQL_HOST=127.0.0.1
    MYSQL_PORT=3306

    # Execute the following command to route the connection:
    kubectl port-forward svc/mysql-1602951452 3306

    mysql -h ${MYSQL_HOST} -P${MYSQL_PORT} -u root -p${MYSQL_ROOT_PASSWORD}

cass-operator will create a Cassandra super user and generate a password that is stored in a secret. A user-defined secret be used instead by setting the .spec.superuserSecretName property in a CassandraDatacenter manifest.

Like the mysql chart, we should output instructions on how to access the username and password of the super user. Both of them are stored in the secret. The secret generated by cass-operator is of the form -superuser.

Additional context
Legacy reference: Jira

┆Issue is synchronized with this Jira Task by Unito
┆friendlyId: K8SSAND-134
┆priority: Medium

@jdonenine jdonenine added enhancement New feature or request complexity:low labels Nov 24, 2020
@sync-by-unito sync-by-unito bot changed the title The k8ssandra-cluster chart instructions should say how to access the super user credentials K8SSAND-134 ⁃ The k8ssandra-cluster chart instructions should say how to access the super user credentials Apr 1, 2022
@bradfordcp
Copy link
Member

@jsanda
Copy link
Contributor

jsanda commented Apr 13, 2022

https://docs-v1.k8ssandra.io/tasks/secure/ describe how to access the credentials which is still applicable with k8ssandra-operator.

This would be an enhancement the k8ssandra chart. Close as wont' fix.

@jsanda jsanda closed this as completed Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

4 participants