Helm Chart: wordpress deployment problem to reach mariadb

8/21/2020

I'm not able to deploy Wordpress using Rancher Catalog and bitnami/wordpress Helm Chart. MariaDB pod runs fine but wordpress pod errors out as

ReplicaSet "wordpress-557fcb8469" has timed out progressing.; Deployment does not have minimum availability.

Also from the wordpress pod logs:

Error executing 'postInstallation': Failed to connect to wordpress-mariadb:3306 after 36 tries

and when using the wordpress pod shell:

I have no name!@wordpress-557fcb8469-gj585:/$ mysql -h wordpress-mariadb -u root -p
Enter password: 
ERROR 2005 (HY000): Unknown MySQL server host 'wordpress-mariadb' (-3)

but

I have no name!@wordpress-557fcb8469-gj585:/$ mysql -h 10.42.0.8 -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 16597
Server version: 10.3.22-MariaDB Source distribution

Any clue what can be set wrong?

Version of Helm and Kubernetes:

version.BuildInfo{Version:"v3.2.4", GitCommit:"0ad800ef43d3b826f31a5ad8dfbb4fe05d143688", GitTreeState:"clean", GoVersion:"go1.13.12"}
Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.6", GitCommit:"d32e40e20d167e103faf894261614c5b45c44198", GitTreeState:"clean", BuildDate:"2020-05-20T13:16:24Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.3", GitCommit:"2e7996e3e2712684bc73f0dec0200d64eec7fe40", GitTreeState:"clean", BuildDate:"2020-05-20T12:43:34Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}

Pods and services in the wordpress namespace:

> kubectl get pods,svc -owide --namespace=wordpress
    NAME                             READY   STATUS    RESTARTS   AGE    IP           NODE            NOMINATED NODE   READINESS GATES
    pod/wordpress-6647794f9b-4mmxd   0/1     Running   20         104m   10.42.0.19   dev-app   <none>           <none>
    pod/wordpress-mariadb-0          1/1     Running   1          26h    10.42.0.14   dev-app   <none>           <none>
    
    NAME                        TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)                      AGE   SELECTOR
    service/wordpress           LoadBalancer   10.43.91.13     <pending>     80:30158/TCP,443:30453/TCP   26h   app.kubernetes.io/instance=wordpress,app.kubernetes.io/name=wordpress,io.cattle.field/appId=wordpress
    service/wordpress-mariadb   ClusterIP      10.43.178.123   <none>        3306/TCP                     26h   app=mariadb,component=master,io.cattle.field/appId=wordpress,release=wordpress
-- JackTheKnife
kubernetes
kubernetes-helm
kubernetes-pod
rancher
wordpress

1 Answer

8/28/2020

Unknown MySQL server host 'wordpress-mariadb' (-3)

The error indicates a DNS failure. Please review your CoreDNS configuration. Check CoreDNS logs for any errors. CoreDNS forwards external queries to the underlined node. Check the node DNS configuration in /etc/resolv.conf as well.

-- Faheem
Source: StackOverflow