This is an operator for wordpress on K8s build with OpenShift in mind.
If you use OpenShift just change kubectl to oc.
git clone [email protected]:nk-designz/wordpress-operator.git
cd wordpress-operator
kubectl apply -f wordpress-operator/deploy/service_account.yaml
kubectl apply -f wordpress-operator/deploy/role.yaml
kubectl apply -f wordpress-operator/deploy/role_binding.yaml
kubectl apply -f wordpress-operator/deploy/crds/wordpress.netzlink.com_wordpresses_crd.yaml
kubectl apply -f wordpress-operator/deploy/operator.yaml
kubectl apply -f wordpress-operator/deploy/crds/wordpress.netzlink.com_v1alpha1_wordpress_cr.yaml
verify it's woriking
kubectl get pods -w
you should be ready to go!
touch my-wordpress.yaml
vim my-wordpress.yaml
This is a example configuration. It utilizes a external mariadb
apiVersion: wordpress.netzlink.com/v1alpha1
kind: Wordpress
metadata:
name: netzlink
spec:
externalDatabase:
database: netzlink
host: wordpressdb-mariadb
password: <secret>
port: 3306
user: netzlink
persistence:
enabled: true
size: 10Gi
resources:
requests:
cpu: 300m
securityContext:
enabled: false
wordpressBlogName: User's Blog!
wordpressEmail: [email protected]
wordpressFirstName: FirstName
wordpressLastName: LastName
wordpressUsername: user
apply it to our cluster
kubectl apply -f my-wordpress.yaml
verify it's woriking again
kubectl get pods -w
kubectl port-forward svc/netzlink-wordpress :80
Open your browser on the port shown
Content type
Image
Digest
Size
61 MB
Last updated
almost 6 years ago
docker pull nicokahlert/wordpress-operator