https://github.com/hirokisan/wordpress-kubernetes
https://github.com/hirokisan/wordpress-kubernetes
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hirokisan/wordpress-kubernetes
- Owner: hirokisan
- Created: 2018-11-04T04:22:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-05T13:22:40.000Z (over 6 years ago)
- Last Synced: 2024-05-05T15:20:29.808Z (about 1 year ago)
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# wordpress-kubernetes
## Start
```
$ minikube start
$ kubectl apply -f mysql-pass.yml
$ kubectl apply -f mysql-deployment.yml
$ kubectl apply -f wordpress-deployment.yml
```## Access
```
$ minikube service wordpress
```## Delete
```
$ kubectl delete -f mysql-pass.yml
$ kubectl delete -f mysql-deployment.yml
$ kubectl delete -f wordpress-deployment.yml
$ minikube stop
```## Deploy to GCP
```
$ gcloud components install kubectl
$ gcloud projects create --name wordpress-kubernetes
$ gcloud config set $PROJECT_ID
$ gcloud container clusters create wordpress-kubernetes --num-nodes=2 \
--zone asia-northeast1-a \
--machine-type g1-small \
--enable-autoscaling --min-nodes=2 --max-nodes=5
$ kubectl apply -f mysql-pass.yml
$ kubectl apply -f mysql-deployment.yml
$ kubectl apply -f wordpress-deployment.yml
```## Delete cluster from GCP
```
$ kubectl delete -f mysql-pass.yml
$ kubectl delete -f mysql-deployment.yml
$ kubectl delete -f wordpress-deployment.yml
$ gcloud container clusters delete wordpress-kubernetes --zone asia-northeast1-a
```## Ref
* [Example: Deploying WordPress and MySQL with Persistent Volumes](https://kubernetes.io/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/)