Building a Operator Using Java, Quarkus, and GraalVM

Confidential and Proprietary Information for Instana, Inc. About Me

● Developer Relations @ Instana ● Principle SRE @ Single Music ● DevOpsDays Organizer ● 20+ years in engineering/tooling ● 5+ years /Containers

Confidential and Proprietary Information for Instana, Inc. Discussion Points

● Basic Intro to Kubernetes and Operators ● Building an Operator with Java ● Instana’s Use-Case for Kubernetes Operators

Confidential and Proprietary Information for Instana, Inc. Intro to Kubernetes (and Operators)

Confidential and Proprietary Information for Instana, Inc. What is Kubernetes? The Greek God of Spending Money (just kidding, that’s Plutus)

....

● API ● Resilient Database ● Container Scheduler

https://kubernetes.io/

Confidential and Proprietary Information for Instana, Inc. What are Operators

Extendable Interfaces which allow custom applications (programs) to configure and run other applications

● Cluster-aware Applications ● Configuration Automation ○ Monitoring ○ Networking ○ Provisioning

Confidential and Proprietary Information for Instana, Inc. Why Java though?

Most Operators have been built with Go, the same language as Kubernetes

● Why Go? ○ Tooling ○ Development Support ○ Fast, Native Binaries ● Why Java? ○ Tooling ○ Development Support ○ Recent advancements (GraalVM/Quarkus)

Confidential and Proprietary Information for Instana, Inc. Let’s build it

Confidential and Proprietary Information for Instana, Inc. Operators are Applications

Initially, our operator will do 3 things ....

Connect to the Get a list of Pods and Connect to an event Kubernetes API via send the Pod stream and send socket through a information to information about programmatic client STDOUT POD events to STDOUT

Confidential and Proprietary Information for Instana, Inc. Instana’s Use-Case for Operators

Confidential and Proprietary Information for Instana, Inc. Instana Operator Core Functions

● Install Role and Access controls to allow the Instana Agent to discover and inject runtime executable code to applications in order to implement distributed tracing, log and metric exporters ● Install the Agent on all running worker nodes so they can auto-discover running pods and applications in those pods, and instrument them ● Coordinate leader election across the DaemonSet to ensure only a single agent is collecting data from the K8S API

Confidential and Proprietary Information for Instana, Inc. Instana brings Observability to Kubernetes

● It’s how we model, present and analyze data ● The operator must instrument not only K8S but the underlying applications ● No longer treating services like Schrödinger's cat ● (A lot) more context around events and transactions

https://peter.bourgon.org/blog/2017/02/21/metrics-tracing-and-logging.html ● Aggregated events with

advanced analysis tools Confidential and Proprietary Information for Instana, Inc. v

Confidential and Proprietary Information for Instana, Inc. v

Confidential and Proprietary Information for Instana, Inc. v

Confidential and Proprietary Information for Instana, Inc. v

Confidential and Proprietary Information for Instana, Inc. Links and Resources

● 3 Part Series on Operators - Fabian Staeber ● Quarkus - quarkus.io ● Custom Resources - Kubernetes Docs ● Operators - Kubernetes Docs ● Kubernetes Monitoring with Instana

Download this Slide Deck (Registration Required)

https://instana.com/kubernetes-operator

Confidential and Proprietary Information for Instana, Inc. Want to learn more about Instana?

https://www.instana.com/automatic-kubernetes-monitoring

Confidential and Proprietary Information for Instana, Inc. 14-day Free Trial

https://instana.com/trial

Confidential and Proprietary Information for Instana, Inc. w w w . i n s t a n a . c o m

Confidential and Proprietary Information for Instana, Inc.