@@ -13,15 +13,27 @@ You can read about the common problems what is this operator framework is solvin
13
13
## Getting Started
14
14
15
15
The easiest way to get started with SDK is start [ minikube] ( https://kubernetes.io/docs/tasks/tools/install-minikube/ ) and
16
- execute one of our [ examples] ( https://github.com/ContainerSolutions/java-operator-sdk/tree/master/samples/webserver )
17
-
18
- Note that you don't have to deploy the operator to a Kubernetes clusters as a pod (however you have to apply the CRD).
19
- If you run this example from you favorite IDE, it will pick up the kubeconfig (prepared by minikube) and will start
20
- processing events of custom resources immediately.
21
-
16
+ execute one of our [ examples] ( https://github.com/ContainerSolutions/java-operator-sdk/tree/master/samples/mysql-schema )
17
+
18
+ Here are the main steps to develop the code and deploy the operator to a Kubernetes cluster. A more detailed and specific
19
+ version can be found under ` samples/mysql-schema/README.md ` .
20
+
21
+ 1 . Setup kubectl to work with your Kubernetes cluster of choice.
22
+ 1 . Apply Custom Resource Definition
23
+ 1 . Compile the whole project (framework + samples) using ` mvn install -P no-integration-tests ` in the root directory
24
+ 1 . Run the main class of the sample you picked and check out the sample's README to see what it does.
25
+ When run locally the framework will use your Kubernetes client configuration (in ~ /.kube/config) to make the connection
26
+ to the cluster. This is why it was important to set up kubectl up front.
27
+ 1 . You can work in this local development mode to play with the code.
28
+ 1 . Build the Docker image and push it to the registry
29
+ 1 . Apply RBAC configuration
30
+ 1 . Apply deployment configuration
31
+ 1 . Verify if the operator is up and running. Don't run it locally anymore to avoid conflicts in processing events from
32
+ the cluster's API server.
22
33
23
34
## Controllers
24
- Controllers are where you implement you logic for you operator.
35
+ Controllers are where you implement the business logic of the Operator. An Operator can host multiple Controllers,
36
+ each handling a different type of Custom Resource. In our samples each Operator has a single Controller.
25
37
26
38
### Generation Awareness
27
39
0 commit comments