Update Constructs authored by Simon Read's avatar Simon Read
......@@ -143,6 +143,48 @@ if we wanted to get more information on the jobs then we can use kubectl logs
```
kubectl logs job kubemoviejob
```
# Operators
Operators are software extensions to Kubernetes that make use of custom resources to manage applications and their components. Operators follow Kubernetes principles, notably the control loop.
An operator is used to
- communicate to the cluster
- restoring backs ups of the applications state
- chooses a leader for a disrupted application
- can simulate failures to test cluster resistance
- publishing a service to applications that dont support Kubernetes API's to discover them
There are a lot of operators that cover a broad range of not just SQL languages but all types of applications. we discovered multiple controllers for Postgresql and Cassandra. the criteria for selection were they must be open source projects with good community support. Postgressql-operator and CassKop meet our criteria and they were used going forward. These operators could be deployed manually by downloading there yamls from respective git repositories and you could edit them and create customization to them. the standard deployment of those operators meet are requirements so no adjustment was made to them.
we deployed our operators using kubectl apply
```
$ kubectl apply -k github.com/zalando/postgres-operator/manifests
```
this references an external link were the correct yamls files are acquired and used to create our Postgresql operator.
CassKop uses Helm to assist it install the correct files to create an operator
```
$ kubectl create namespace cassandra
$ kubectl apply -f https://raw.githubusercontent.com/Orange-OpenSource/casskop/master/deploy/crds/db.orange.com_cassandraclusters_crd.yaml
$ helm repo add orange-incubator https://orange-kubernetes-charts-incubator.storage.googleapis.com
$ helm install casskop orange-incubator/cassandra-operator
```
once these operator are successful created they will have a pod and a service.
```
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
postgres-operator-f4545b4c7-7sfqb 1/1 Running 14 19d
$ kubectl get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
postgres-operator ClusterIP 10.152.183.37 <none> 8080/TCP 19d
```
in the database connections we use the name of the operator service *postgres-operator* as the host address to connect to the cluster.
# Namespaces
......
......