diff --git a/deploy/example-single-node-cluster.yaml b/deploy/example-single-node-cluster.yaml new file mode 100644 index 0000000..889c1be --- /dev/null +++ b/deploy/example-single-node-cluster.yaml @@ -0,0 +1,7 @@ +apiVersion: "echo.redhat.com/v1" +kind: "EchoApp" +metadata: + name: "echo-local" +spec: + size: 1 + image: "docker.io/tohinkashem/echo:1.0" diff --git a/deploy/rbac.yaml b/deploy/rbac.yaml index ca9c23a..5f16b3b 100644 --- a/deploy/rbac.yaml +++ b/deploy/rbac.yaml @@ -13,21 +13,13 @@ rules: - "" resources: - pods - - services - - endpoints - - persistentvolumeclaims - - events - - configmaps - - secrets verbs: - "*" - apiGroups: - apps resources: - deployments - - daemonsets - replicasets - - statefulsets verbs: - "*" diff --git a/readme.MD b/readme.MD index fc15630..90c6cf3 100644 --- a/readme.MD +++ b/readme.MD @@ -1,4 +1,4 @@ -## Steps +## Building an Operator with the operator-sdk ```bash # build operaotr-sdk @@ -54,3 +54,21 @@ type EchoAppStatus struct { ```bash $ operator-sdk generate k8s ``` + +## Deploying the operator +```bash +# Create the custom resource definition +$ kubectl create -f deploy/crd.yaml + +# Create the Roleand create the Role Binding +$ kubectl create -f deploy/rbac.yaml + +# Deploy the operator +$ kubectl create -f deploy/operator.yaml +``` + +## Deploying a single node echo cluster +```bash +# Deploy the cluster +$ kubectl create -f deploy/example-single-node-cluster.yaml +```