Sunday, February 14, 2021

Testing Triple-A Operator on Container Engine for Kubernetes (OKE)

I dedicated most of my spare time over the past 1 year to develop and perfecting the Triple-A Operator with mind and heart. It is a Kubernetes Operator written in GOLANG to automate the deployment and life cycle of the InnoDB Cluster on the Kubernetes platform.

Testing after testing that I did on Triple-A was very encouraging. Triple-A Operator does well as planned on top of Kubernetes, Openshift, and Oracle Container Engine for Kubernetes (OKE). Bug by bug has been resolved and I currently believe the operator is working well. Triple-A Operator can be pulled from dockerhub and ready to use.

Features on Triple-A Operator:

  1. Available on Public Docker Registry
  2. Simple concept, very easy to use
  3. Portable, able to run on Kubernetes / Openshift / OKE
  4. It’s a sidecar container that monitor the state of InnoDB Cluster
  5. Automatic configuration of InnoDB Cluster on Containers
  6. Automatic cluster membership alignment with the Statefulset's replica changes
  7. Automatic adding or removing members
  8. Network partition or pod’s failure handling
  9. Reboot cluster from complete outage handling
  10. Ad-hoc and scheduled MySQL database autobackup

This post explains Triple-A testing on OKE. I've explain the entire process of deploying MySQL InnoDB Cluster manually on OKE without Operator, here is the blog post: https://mysqlsg.blogspot.com/2021/01/oracle-container-engine-for-kubernetes.html.

I did section A and section B from the blog post, but on this test I used MySQL community docker version. Thus, I did not pull MySQL E.E docker image into my OKE Cluster.

A one time setup to install TRIPLEA Operator:

1. Create a namespace (e.g. "mysql-cluster")

kubectl create ns mysql-cluster

2. Create service account

Get sample YAML from https://github.com/tripplea-sg/innodb-cluster-operator/blob/main/sample/k8s-service-account.yaml

Apply YAML: kubectl apply -f k8s-service-account.yaml

3. Create role

Get sample YAML from https://github.com/tripplea-sg/innodb-cluster-operator/blob/main/sample/k8s-role.yaml

Apply YAML: kubectl apply -f k8s-role.yaml

4. Create role binding

Get sample YAML from https://github.com/tripplea-sg/innodb-cluster-operator/blob/main/sample/k8s-role-binding.yaml

Apply YAML: kubectl apply -f k8s-role-binding.yaml

 Done. Then, I used this Operator to run MySQL InnoDB Cluster.

 1. Create secret to set root password (Triplea operator currently does not support complex password)

Get sample YAML from https://github.com/tripplea-sg/innodb-cluster-operator/blob/main/sample/k8s-secret.yaml

Apply YAML: kubectl apply -f k8s-secret.yaml

2. Apply InnoDB Cluster

Get sample YAML from https://github.com/tripplea-sg/innodb-cluster-operator/blob/main/sample/k8s-mysql-with-disk.yaml

Apply YAML: kubectl apply -f k8s-mysql-with-disk.yaml

InnoDB Cluster is running after waited for 2 mins!

 ---

AAA

 

2 comments: