Obtain Username and Password

The default username is: admin The password can be obtained through the following command:

kubectl get secret {dn name} -o jsonpath={.data.admin} | base64 -d | xargs echo "Password"

Obtain Connection String

Execute the following command to get the clusterIp:

kubectl get svc {dn name}

You should expect the following output:

NAME                  TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)              AGE
tunan-oss-drsg-dn-0   ClusterIP   192.168.192.73   <none>        3306/TCP,31306/TCP   21d

If you are inside the K8s cluster, you can directly access it through the cluster-ip plus port 3306.

If you are outside the K8s cluster, execute the following command to forward the port to the local machine for access:

kubectl port-forward svc/{dn name} 3306:3306

results matching ""

    No results matching ""