Flink in Native Kubernetes
Flink in Native Kubernetes
deploy flink in the Session Mode
flink will deploy in the namespace default as default and use default as serviceaccount,
if we want deploy in another namespace, we can set kubernetes.namespace.
and we should modify the serviceacount.We either modify the permissions of default or create a new serviceAccount.
create serviceaccount flink-service-account
$ kubectl create serviceaccount flink-service-account
$ kubectl create clusterrolebinding flink-role-binding-flink --clusterrole=edit --serviceaccount=default:flink-service-account
delpoy the flink
./bin/kubernetes-session.sh -Dkubernetes.cluster-id=first\
-Dkubernetes.service-account=flink-service-account \
-Dtaskmanager.memory.process.size=4096m \
-Dtaskmanager.numberOfTaskSlots=2 \
-Dresourcemanager.taskmanager-timeout=3600000
flink will create taskmanger when a job was submitted,
resources will be requested before taskmanger starts,
and the usage of cpu is set to the number of slots per TaskManager by default.
before submit we need to make sure that we can reach the jobmanger.
we can set service in the type of NodePort
submit the job
./bin/flink run -d -e kubernetes-session -Dkubernetes.cluster-id=first examples/streaming/WindowJoin.jar
相关连接
Native Kubernetes

浙公网安备 33010602011771号