deployment.yaml
Create a deployment definition file using the template below.
For --cluster-id
, enter the name of your cluster. This will be the name used in the memsql-cluster.yaml
file as per:
metadata: name: memsql-cluster
apiVersion: apps/v1 kind: Deployment metadata: name: memsql-operator labels: app.kubernetes.io/component: operator spec: replicas: 1 selector: matchLabels: name: memsql-operator template: metadata: labels: name: memsql-operator spec: serviceAccountName: memsql-operator containers: - name: memsql-operator image: "OPERATOR_IMAGE" imagePullPolicy: Always args: [ # Cause the operator to merge rather than replace annotations on services "--merge-service-annotations", # Allow the process inside the container to have read/write access to the `/var/lib/memsql` volume. "--fs-group-id", "5555", "--cluster-id", "<<--- ENTER NAME OF CLUSTER--->>" ] env: - name: WATCH_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace - name: POD_NAME valueFrom: fieldRef: fieldPath: metadata.name - name: OPERATOR_NAME value: "memsql-operator"
You must edit this file and replace OPERATOR_IMAGE
with the either the local memsql/operator
Docker image you pulled down (such as "memsql-operator"
), or add in an imagePullSecrets
section under the spec
section and reference a Kubernetes Secret that you can create via kubectl apply
.
Refer to the Kubernetes documentation for more information on imagePullPolicy
and creating Secrets.