This document discusses creating Kubernetes operators and controllers using different programming languages besides Go. It suggests that a Java-based controller is possible using the GraalVM, which allows creating native executables from Java bytecode. Key points covered include what controllers and operators are, that no specific technology stack is required, and that the JVM could be a good option for controller development with GraalVM's support for polyglot programming and creating native applications.
3. @nicolas_frankel
Hazelcast
HAZELCAST IMDG is an operational,
in-memory, distributed computing
platform that manages data using
in-memory storage, and performs
parallel execution for breakthrough
application speed and scale.
HAZELCAST JET is the ultra fast,
application embeddable, 3rd
generation stream processing
engine for low latency batch
and stream processing.
4. @nicolas_frankel
“Kubernetes (K8s) is an open-source
system for automating
deployment, scaling, and
management of containerized
applications.”
Kubernetes
6. @nicolas_frankel
“The Kubernetes API server validates
and configures data for the api
objects which include pods, services,
replication controllers, and others.
The API Server services REST
operations and provides the
frontend to the cluster’s shared state
through which all other
components interact.”
Kubernetes API Server
8. @nicolas_frankel
“In Kubernetes, controllers are
control loops that watch the state of
your cluster, then make or request
changes where needed. Each
controller tries to move the current
cluster state closer to the desired
state.”
Controllers
10. @nicolas_frankel
• Out-of-the-box controllers run in
the control plane
• Custom controllers can run
anywhere
• As a Pod (or multiple Pods) inside the
cluster
• As anything outside the cluster
Where are controllers located?
11. @nicolas_frankel
“An Operator is an application-specific
controller that extends the Kubernetes
API to create, configure and manage
instances of complex stateful
applications on behalf of a Kubernetes
user. It builds upon the basic
Kubernetes resource and controller
concepts, but also includes domain or
application-specific knowledge to
automate common tasks better
managed by computers.”
Operator vs. controller
12. @nicolas_frankel
“Defining a CRD object creates a new
custom resource with a name and
schema that you specify. The
Kubernetes API serves and handles
the storage of your custom
resource.”
Custom Resource Definition
14. @nicolas_frankel
• To simplify, an operator is just a
controller that manages a CRD
• If you know how to develop a
controller, you know how to
develop an operator
Operator vs. controller
15. @nicolas_frankel
• Must “talk” to the API server
• REST-based
• One can create a controller using
the shell only
The technology stack of controllers
17. @nicolas_frankel
varFoo, err := GetFoo()
if err != nil {
return err
}
sliceBar, err := SliceTheBar(varFoo)
if err != nil {
return err
}
err := CheckBarSlice(sliceBar)
if err != nil {
return err
}
Why not Go?
18. @nicolas_frankel
• Making the switch to a new
language is hard
• Learning the syntax
• Using it in an idiomatic way
• Getting to know the libraries
• Getting the right tooling
• Getting used to it
• Your team already knows X, use it
Why X?