Wordpress operator for Kubernetes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Vladimir Smagin aee47ae9f9 add finalizers and purge PVC flags 1 maand geleden
build bootstrap 4 maanden geleden
cmd/manager bootstrap 4 maanden geleden
deploy add finalizers and purge PVC flags 1 maand geleden
pkg add finalizers and purge PVC flags 1 maand geleden
version add finalizers and purge PVC flags 1 maand geleden
.gitignore bootstrap 4 maanden geleden
Dockerfile add Dockerfile 3 maanden geleden
Makefile add finalizers and purge PVC flags 1 maand geleden
README.md add finalizers and purge PVC flags 1 maand geleden
VERSION add finalizers and purge PVC flags 1 maand geleden
go.mod add finalizers and purge PVC flags 1 maand geleden
go.sum fix 3 maanden geleden
logo.png add logo 4 maanden geleden
tools.go bootstrap 4 maanden geleden

README.md

Wordpress operator for Kubernetes

Run multiple Wordpress instances in your Kubernetes cluster.

Build sources

Prebuilt images

You can find images here https://hub.docker.com/r/iam21h/wordpress-operator

Deploy operator

kubectl -f deploy/service_account.yaml
kubectl -f deploy/role.yaml
kubectl -f deploy/role_binding.yaml
kubectl -f deploy/operator.yaml

Your first Wordpress deployment

Use internal or external database. Internal database means a single pod with MariaDB without any replication or clusterization, my Wordpress operator is NOT MySQL operator. If you need database high availability use specific MySQL operator to create cluster.

Think scalability before first start, because you can’t mount ReadWriteOnce persistent volume to multiple pods (replicas > 1), so you need storage class with ReadWriteMany feature.

Changed: now PVCs not purging after custom resource deletion. To delete PVCs use special flags.

This sample resource can help you run your first instance with many pods:

apiVersion: blindage.org/v1alpha1
kind: Wordpress
metadata:
  name: my-test-wordpress
spec:
  replicas: 3
  databaseVolumeSize: 1Gi
  wordpressVolumeSize: 2Gi
  # set storage class with ReadWriteMany feature
  wordpressStorageClass: nfs
  # purge PVCs after use
  databaseVolumeCleanup: true
  wordpressVolumeCleanup: true

Or if you want to use external database:

apiVersion: blindage.org/v1alpha1
kind: Wordpress
metadata:
  name: another
spec:
  database:
    database: wordpress
    hostname: my-test-wordpress-database
    password: wordpress
    username: wordpress
  replicas: 1
  wordpressVolumeSize: 1Gi

Look to pkg/apis/blindage/v1alpha1/wordpress_types.go to find more parameters like affinity or annotations.


Copyright by Vladimir Smagin (21h) 2019
http://blindage.org email: 21h@blindage.org
Project page: https://git.blindage.org/21h/wordpress-operator