Last active
April 6, 2023 13:00
-
-
Save dalelane/0ac6b9211c84c3a551f12b6c1675a1d2 to your computer and use it in GitHub Desktop.
Example spec for creating a simple, unsecured, Operator-managed deployment of Apache Flink
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Creating an Operator-managed deployment of Apache Flink | |
# | |
# | |
# permissions for running a Flink pod | |
# | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: Role | |
metadata: | |
name: flink | |
labels: | |
app.kubernetes.io/name: flink-kubernetes-operator | |
app.kubernetes.io/version: 1.4.0 | |
rules: | |
- verbs: | |
- '*' | |
apiGroups: | |
- '' | |
resources: | |
- pods | |
- configmaps | |
- services | |
- verbs: | |
- '*' | |
apiGroups: | |
- apps | |
resources: | |
- deployments | |
- deployments/finalizers | |
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: flink | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: RoleBinding | |
metadata: | |
name: flink-role-binding | |
subjects: | |
- kind: ServiceAccount | |
name: flink | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: Role | |
name: flink | |
--- | |
# | |
# flink deployment | |
# | |
kind: FlinkDeployment | |
apiVersion: flink.apache.org/v1beta1 | |
metadata: | |
name: my-flink | |
spec: | |
# built using Dockerfile at | |
# https://gist.github.com/dalelane/0bf366df692e1e754556d152c7dc21aa | |
image: dalelane/flink-with-connectors:latest | |
flinkVersion: v1_17 | |
flinkConfiguration: | |
taskmanager.numberOfTaskSlots: '10' | |
jobManager: | |
resource: | |
memory: 2048m | |
cpu: 1 | |
taskManager: | |
resource: | |
memory: 6648m | |
cpu: 4 | |
serviceAccount: flink | |
podTemplate: | |
apiVersion: v1 | |
kind: Pod | |
spec: | |
containers: | |
- name: flink-main-container | |
volumeMounts: | |
- mountPath: /opt/flink/log | |
name: flink-logs | |
volumes: | |
- emptyDir: {} | |
name: flink-logs | |
--- | |
# | |
# route for making the Flink dashboard UI externally | |
# accessible | |
# | |
apiVersion: route.openshift.io/v1 | |
kind: Route | |
metadata: | |
name: flink-ui-dashboard | |
labels: | |
app: my-flink | |
type: flink-native-kubernetes | |
spec: | |
to: | |
kind: Service | |
name: my-flink-rest | |
tls: null | |
port: | |
targetPort: rest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment