Open nvsajeeva opened 2 months ago
Hi @nvsajeeva, since you didn't enable external access, the provisioned DB is only accessible by clients living inside your k8s cluster.
In order to connect to it you'll need 2 things:
You can easily get both of these from the UI but if you want to do it through the shell here's how:
kubectl get db <YourDBName> -n <YourDBNamespace> -o jsonpath='{.status.hostname}'
But you already found this out, it's sajeevadb-haproxy.everest
(10.99.180.88
).kubectl get secret everest-secrets-<YourDBName> -n <YourDBNamespace> -o go-template='{{.data.root|base64decode}}'
For testing purposes, you can run a container with mysql
tool and connect its console output to your terminal. In a real scenario, you'd configure your application instead. Here's how to test it:
Run the client application:
kubectl run -n everest -i --rm --tty percona-client --image=percona:8.0 --restart=Never -- bash -il
Executing it may require some time to deploy the corresponding Pod.
Now run the mysql
tool in the percona-client
command shell using the password obtained from the Secret instead of the
mysql -h <YourDBHostname> -uroot -p'<RootPassword>'
Hello, I have created a database with external access = false. Please kindly let me know how I can access it.