flink-kubernetes-operator

by QuenchWorks

Helm chartv0.0.3App 1.16.1Apache-2.0Verified publisher

Apache Flink Kubernetes Operator: runs Flink applications and session clusters from FlinkDeployment and FlinkSessionJob resources, with savepoint-based upgrades and the job autoscaler. Upstream's chart on the QuenchWorks image: built from the Apache source release, nonroot, CVE-gated, cosign-signed and pinned by digest.

About this chart

Quenchworks flink-kubernetes-operator

The Apache Flink Kubernetes Operator 1.16.1 on the QuenchWorks image (built from the Apache source release, nonroot, CVE-gated at build, pinned by digest, cosign-signed). The operator runs Flink applications and session clusters from FlinkDeployment and FlinkSessionJob resources, with savepoint-based upgrades and the job autoscaler.

This is upstream's own chart (Apache-2.0) with three QuenchWorks defaults: the image is ours and pinned by digest, the pods run as uid 1001, and the admission webhook is off.

Install

helm install flink-kubernetes-operator oci://ghcr.io/quenchworks/charts/flink-kubernetes-operator -n flink --create-namespace

Then a session cluster on the QuenchWorks Flink image:

apiVersion: flink.apache.org/v1beta1
kind: FlinkDeployment
metadata: { name: session, namespace: flink }
spec:
  image: ghcr.io/quenchworks/images/flink:2.3.0
  flinkVersion: v2_3
  serviceAccount: flink
  flinkConfiguration:
    kubernetes.entry.path: /usr/bin/docker-entrypoint.sh
  jobManager: { resource: { memory: "1024m", cpu: 0.5 } }
  taskManager: { resource: { memory: "1024m", cpu: 0.5 } }

Values

All of upstream's values work. The ones QuenchWorks changes:

KeyDefaultNotes
image.repositoryghcr.io/quenchworks/images/flink-kubernetes-operatoroperator and webhook
image.digestpinnedtakes precedence over image.tag
podSecurityContext.runAsUser / runAsGroup1001upstream: 9999
webhook.createfalseupstream: true; needs cert-manager

Notes

  • Only the operator is a QuenchWorks image. The Flink clusters run the image named in each FlinkDeployment. The QuenchWorks Flink image keeps its entrypoint at /usr/bin/docker-entrypoint.sh, so set kubernetes.entry.path as above (Apache's images use /docker-entrypoint.sh, Flink's default).
  • The webhook validates and defaults resources. Its certificate comes from cert-manager: install cert-manager, then set webhook.create=true.
  • By default the operator watches every namespace and creates the flink service account for jobs in its own namespace. Set watchNamespaces to limit it; upstream's chart then creates the job role in each.
  • Helm installs the CRDs on first install and never upgrades or deletes them. Apply the new crds/ before upgrading across operator releases.

Deploy flink-kubernetes-operator with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has flink-kubernetes-operator on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartflink-kubernetes-operator is pinned at v0.0.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply