wordpress-operator
Bitpoke WordPress operator enables managing multiple WordPress installments at scale.
Goals and status
The main goals of the operator are:
- Easily deploy scalable WordPress sites on top of kubernetes
- Allow best practices for en masse upgrades (canary, slow rollout, etc.)
- Friendly to devops (monitoring, availability, scalability and backup stories solved)
The project is actively developed and maintained and has reached stable beta state. Check here the project releases.
The minimum supported Kubernetes version is 1.19.
Components
- WordPress operator - this project
- WordPress runtime - container image supporting the project goals (https://github.com/bitpoke/stack-runtimes/tree/master/wordpress)
Deploy
Install CRDs
This step is optional. By default helm will install CRDs.
Install kustomize. New to kustomize? Check https://kustomize.io/
Install kubectl. For more details, see: https://kubernetes.io/docs/tasks/tools/install-kubectl/
To install CRDs use the following command:
kubectl apply -f https://raw.githubusercontent.com/bitpoke/wordpress-operator/master/config/crd/bases/wordpress.presslabs.org_wordpresses.yaml
Install controller
Install helm. New to helm? Check https://github.com/helm/helm#install
To deploy this controller, use the provided helm chart, by running:
helm repo add bitpoke https://helm-charts.bitpoke.io
helm install wordpress-operator bitpoke/wordpress-operator
Deploying a WordPress Site
apiVersion: wordpress.presslabs.org/v1alpha1
kind: Wordpress
metadata:
name: mysite
spec:
replicas: 3
domains:
- example.com
code:
git:
repository: https://github.com/example.com
media:
gcs:
bucket: calins-wordpress-runtime-playground
prefix: mysite/
env:
- name: GOOGLE_CREDENTIALS
valueFrom:
secretKeyRef:
name: mysite
key: google_application_credentials.json
- name: GOOGLE_PROJECT_ID
value: development
bootstrap:
env:
- name: WORDPRESS_BOOTSTRAP_USER
valueFrom:
secretKeyRef:
name: mysite
key: USER
- name: WORDPRESS_BOOTSTRAP_PASSWORD
valueFrom:
secretKeyRef:
name: mysite
key: PASSWORD
- name: WORDPRESS_BOOTSTRAP_EMAIL
valueFrom:
secretKeyRef:
name: mysite
key: EMAIL
- name: WORDPRESS_BOOTSTRAP_TITLE
valueFrom:
secretKeyRef:
name: mysite
key: TITLE
volumes: []
volumeMounts: []
env:
- name: DB_HOST
value: mysite-mysql
- name: DB_USER
valueFrom:
secretKeyRef: mysite-mysql
key: USER
- name: DB_PASSWORD
valueFrom:
secretKeyRef: mysite-mysql
key: PASSWORD
- name: DB_NAME
valueFrom:
secretKeyRef: mysite-mysql
key: DATABASE
envFrom: []
tlsSecretRef: mysite-tls
ingressAnnotations: {}
License
This project is licensed under Apache 2.0 license. Read the LICENSE file in the
top distribution directory, for the full license text.