Saurav K
Saurav K

Reputation: 21

Issue in connecting the MariaDB using MaxScale

I am trying to connect to MariaDB using below approach using the service name for MaxScale here:

 kubectl run mariadb --rm -it --image=mariadb:10.6 -- bash -c "mariadb  -h mariadb-galera-maxscale.default.svc.cluster.local  -P3306 -u mariadb -p'xxxxxxx'"

Where 3306:32000 is the port exposed for maxscale service. But, i am always getting below error:

error: timed out waiting for the condition

pod log

kubectl logs mariadb
ERROR 1045 (28000): Access denied for user 'mariadb'@'10.244.0.97' (using password: YES)

maxscale pod is running:

kubectl get pods -A| grep maxscale
default              mariadb-galera-maxscale-0                          1/1     Running   0             10m

Service yaml used is here

kubectl describe svc mariadb-galera-maxscale                                                                            
Name:                     mariadb-galera-maxscale
Namespace:                default
Labels:                   <none>
Annotations:              metallb.universe.tf/loadBalancerIPs: 172.18.0.229
Selector:                 app.kubernetes.io/instance=mariadb-galera-maxscale,app.kubernetes.io/name=maxscale
Type:                     LoadBalancer
IP Family Policy:         SingleStack


 Warning  AllocationFailed  100s  metallb-controller  Failed to allocate IP for "default/mariadb-galera-maxscale": ["172.18.0.229"] is not allowed in config

Please Help. Is there any other way to use the service name of MaxScale to connect to MariaDB?

Upvotes: 0

Views: 42

Answers (0)

Related Questions