You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I have created a database with external access = false.
Please kindly let me know how I can access it.
k get db -A
NAMESPACE NAME SIZE READY STATUS HOSTNAME AGE
everest sajeevadb 2 2 ready sajeevadb-haproxy.everest 16m
k get services -n everest
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
percona-xtradb-cluster-operator ClusterIP 10.97.23.85 <none> 443/TCP 31m
sajeevadb-haproxy ClusterIP 10.99.180.88 <none> 3306/TCP,3309/TCP,33062/TCP,33060/TCP 15m
sajeevadb-haproxy-replicas ClusterIP 10.109.9.147 <none> 3306/TCP 15m
sajeevadb-pxc ClusterIP None <none> 3306/TCP,33062/TCP,33060/TCP 15m
sajeevadb-pxc-unready ClusterIP None <none> 3306/TCP,33062/TCP,33060/TCP 15m
The text was updated successfully, but these errors were encountered:
Hi @nvsajeeva, since you didn't enable external access, the provisioned DB is only accessible by clients living inside your k8s cluster.
Gathering connection info
In order to connect to it you'll need 2 things:
hostname or IP address
root user's password
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}}'
Connecting
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:
Hello,
I have created a database with external access = false.
Please kindly let me know how I can access it.
The text was updated successfully, but these errors were encountered: