WordPress GUI on Kubernetes
I have brought up mysql and wordpress containers on my master-minion single node of the kubernetes cluster (I have created this setup inside my openstack cloud). But when I try to access it on my web, it gives me a “page not found” error.
While listing the endpoints of ther services running, I can use the docker ip to access wordpress through the elinks command.
$ kubectl get endpoints NAME ENDPOINTS kubernetes 22.214.171.124:6443 mysql 172.17.0.2:3306 wpfrontend 172.17.0.3:80 $ elinks 172.17.0.3:80
How do I access through my web GUI?
2 Solutions collect form web for “WordPress GUI on Kubernetes”
Please check out the following documentation:
You need to set up a load balancer to expose your Kubernetes service externally.
Here is a soup-to-nuts WordPress example with backing persistent storage: https://github.com/openshift/origin/tree/master/examples/wordpress.
You’ll want to use Cinder volumes, though. Here is the github pull that adds Cinder support to the WordPress example: https://github.com/openshift/origin/pull/4403
The example is in OpenShift, but OpenShift is based on Kube (Red Hat is a major contributor to Kube). The example works exactly the same, you’ll just substitute the OpenShift client (oc) with the Kube client (kubectl).
Like Abhishek mentioned, you need a Service. The example above contains services that front MySQL and WordPress.