最近测试了一下flink on k8s native ,使用session 模式,启动session集群,
启动命令:
./bin/kubernetes-session.sh \
-Dkubernetes.cluster-id=lz-test01 \
-Dkubernetes.rest-service.exposed.type=NodePort
返回url:
| 2021-04-30 14:50:27,525 INFO org.apache.flink.kubernetes.KubernetesClusterDescriptor [] - Create flink session cluster lz-test01 successfully, JobManager Web Interface:
http://10.83.79.13:32081 |
使用 curl
http://10.83.79.13:32081 可以返回html内容。
但是使用application模式启动任务 ,启动命令:
./bin/flink run-application \
--target kubernetes-application \
-Dkubernetes.cluster-id=lz-application-test-01\
-Dkubernetes.rest-service.exposed.type=NodePort \
-Dkubernetes.container.image=flink-lz-application \
local:///tmp/usrlib/my-flink-job.jar
返回url:
| 2021-04-30 14:52:02,946 INFO org.apache.flink.kubernetes.KubernetesClusterDescriptor [] - Create flink application cluster lz-application-test-01 successfully, JobManager Web Interface:
http://10.83.79.13:32106 |
使用 curl
http://10.83.79.13:32106 无法访问。
不知道大家使用application模式是怎样的姿势~
service显示为:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 2d20h
service/lz-application-test-01 ClusterIP None <none> 6123/TCP,6124/TCP 75s
service/lz-application-test-01-rest NodePort 10.109.124.131 <none> 8081:32106/TCP 75s
service/lz-test01 ClusterIP None <none> 6123/TCP,6124/TCP 2m50s
service/lz-test01-rest NodePort 10.105.222.201 <none> 8081:32081/TCP 2m50s
service/nginx NodePort 10.104.13.23 <none> 80:32667/TCP 2d3h
| |
spoon_lz
|
|
[hidden email]
|
签名由网易邮箱大师定制