Quick Start #
This document provides a quick introduction to using the Flink Kubernetes Operator. Readers of this document will be able to deploy the Flink operator itself and an example Flink job to a local Kubernetes installation.
Prerequisites #
We assume that you have a local installations of the following:
So that the kubectl and helm commands are available on your local system.
For docker we recommend that you have Docker Desktop installed and configured with at least 8GB of RAM. For kubernetes minikube is our choice, at the time of writing this we are using version v1.25.3 (end-to-end tests are using the same version). You can start a cluster with the following command:
|
|
We also recommend k9s as GUI for kubernetes, but it is optional for this quickstart guide.
Deploying the operator #
Install the certificate manager on your Kubernetes cluster to enable adding the webhook component (only needed once per Kubernetes cluster):
|
|
In case the cert manager installation failed for any reason you can disable the webhook by passing
--set webhook.create=falseto the helm install command for the operator.
Now you can deploy the selected stable Flink Kubernetes Operator version using the included Helm chart:
|
|
OPERATOR-VERSION 的版本为 1.9.0 To find the list of stable versions please visit https://flink.apache.org/downloads.html
The Helm chart by default points to the
ghcr.io/apache/flink-kubernetes-operatorimage repository. If you have connectivity issues or prefer to use Dockerhub instead you can use--set image.repository=apache/flink-kubernetes-operatorduring installation.
You may verify your installation via kubectl and helm:
|
|
Submitting a Flink job #
Once the operator is running as seen in the previous step you are ready to submit a Flink job:
|
|
You may follow the logs of your job, after a successful startup (which can take on the order of a minute in a fresh environment, seconds afterwards) you can:
|
|
To expose the Flink Dashboard you may add a port-forward rule or look the ingress configuration options:
|
|
Now the Flink Dashboard is accessible at localhost:8081.
In order to stop your job and delete your FlinkDeployment you can:
|
|
install minio
|
|
输出 o/bitnamicharts/minio Pulled: registry-1.docker.io/bitnamicharts/minio:14.6.19 Digest: sha256:2536f58a3618bf117615dc831338e09927816b914af518422ff6df83d6e74896 NAME: minio LAST DEPLOYED: Sun Jul 7 20:25:45 2024 NAMESPACE: default STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: CHART NAME: minio CHART VERSION: 14.6.19 APP VERSION: 2024.7.4
** Please be patient while the chart is being deployed **
MinIO® can be accessed via port on the following DNS name from within your cluster:
minio.default.svc.cluster.local
To get your credentials run:
export ROOT_USER=$(kubectl get secret –namespace default minio -o jsonpath="{.data.root-user}" | base64 -d) export ROOT_PASSWORD=$(kubectl get secret –namespace default minio -o jsonpath="{.data.root-password}" | base64 -d)
To connect to your MinIO® server using a client:
-
Run a MinIO® Client pod and append the desired command (e.g. ‘admin info’):
kubectl run –namespace default minio-client
–rm –tty -i –restart=‘Never’
–env MINIO_SERVER_ROOT_USER=$ROOT_USER
–env MINIO_SERVER_ROOT_PASSWORD=$ROOT_PASSWORD
–env MINIO_SERVER_HOST=minio
–image docker.io/bitnami/minio-client:2023.12.23-debian-11-r1 – admin info minio
To access the MinIO® web UI:
-
Get the MinIO® URL:
You should be able to access your new MinIO® web UI through
⚠ SECURITY WARNING: Original containers have been substituted. This Helm chart was designed, tested, and validated on multiple platforms using a specific set of Bitnami and Tanzu Application Catalog containers. Substituting other containers is likely to cause degraded security and performance, broken chart features, and missing environment variables.
Substituted images detected:
- docker.io/bitnami/minio:2023.12.23-debian-11-r2
- docker.io/bitnami/minio-client:2023.12.23-debian-11-r1
- docker.io/bitnami/os-shell:11-debian-11-r93