- Clone repo and access directory with kubernetes files
git clone https://github.com/AndreyK-git/k8-mediawiki.git
cd k8-mediawiki/kubernetes
- Using kubectl and the yaml files, create the kubernetes secrets, volumes, services, and deployments
kubectl create -f secrets.wiki.yaml
kubectl create -f vol-wiki.yaml
kubectl create -f svc-wiki.yaml
kubectl create -f deploy-wiki-sql.yaml
kubectl create -f deploy-wiki-web.yaml
- Verify everything was created as expected.
kubectl describe deployments
- Launch browser and point it to a kubernetes node followed by port ":30010". Go through mediawiki installation wizard and enter the following when prompted
Database host: svc-wiki-sql
Database name: wikidb
Database username: wikiuser
Database password: wikiuser
- After wizard is completed, download LocalSettings.php and copy to /var/www/data/ within your wiki-web pod
kubectl cp /Users/andrey.kumanov/Downloads/LocalSettings.php [wiki-web_pod_name]:/var/www/data/LocalSettings.php
- Install visibility and monitoring using heapster, grafana, and influxdb
kubectl create -f monitor/
- Verify services are up and running
kubectl get pods --namespace=kube-system
kubectl get services --namespace=kube-system
- Login to grafana by pointing browser to kubernetes node, followed by port listed from the services output in previous step.
- At the top left left-click on the grafana icon and left-click "Sign In"
Username: admin
Password: admin
- Left-click on the grafana icon again and left-click on "Data Sources". In the middle there should be an influxdb datasource box, left-click on it
- A pre-populated form will pop up, scroll down and select "Save & Test" (it may take a few minutes after creating the deployments before influxdb is ready to be paired with grafana)
- Return to the grafana dashboards and select "Cluster" or "Pods" to see the metrics as pods get created or destroyed