codeasashu / kubernetes-wordpress-example

Deploying a simple wordpress app on 2 pods using deployments and accessing it via services

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kubernetes Wordpress example

This repository is a minimal example of getting started with a wordpress latest app on kubernetes. I will be putting up a blog post soon, but for now, I am expirementing with kubernetes and got success using these.

How to run

  1. Install Kubernetes

  2. Create Deployment

  • cd into directory where you have cloned this repo.

  • Create a deployment

/kubernetes-wordpress-example$ kubectl create -f resources/wp-deployment.yaml
  • Check if deployment is running
/kubernetes-wordpress-example$ kubectl get deployments

You should be able to see wp-deployment in the list

  1. Create Service
  • Create a new service by running
/kubernetes-wordpress-example$ kubectl create -f resources/wp-service.yaml

You should be able to see wp-app-lb in the list

Accessing wordpress

Once you have setup everything, you should be able to access it via the url of service. To obtain your service url, issue following command:

minikube service --url wp-app-lb

Open the link and you will be able to see wordpress installation page

About

Deploying a simple wordpress app on 2 pods using deployments and accessing it via services