diff --git "a/docs_zh/\345\277\253\351\200\237\345\274\200\345\247\213.md" "b/docs_zh/\345\277\253\351\200\237\345\274\200\345\247\213.md" index d89dfa3872..52f106284b 100644 --- "a/docs_zh/\345\277\253\351\200\237\345\274\200\345\247\213.md" +++ "b/docs_zh/\345\277\253\351\200\237\345\274\200\345\247\213.md" @@ -203,6 +203,48 @@ sh ./bin/chunjun-yarn-perjob.sh -job chunjun-examples/json/stream/stream.json [参考视频](https://www.bilibili.com/video/BV1oU4y1D7e7?spm_id_from=333.999.0.0) +## Kubernetes Session + +命令示例: + +``` +bin/chunjun-kubernetes-session.sh \ + -job chunjun-examples/json/stream/stream.json \ + -jobName kubernetes-job \ + -jobType sync \ + -remoteChunJunDistDir chunjun-dist \ + -flinkLibDir $FLINK_HOME/lib \ + -flinkConfDir $FLINK_HOME/conf \ + -confProp "{\"kubernetes.config.file\":\"${kubernetes_config_path}\",\"kubernetes.cluster-id\":\"${cluster_id}\",\"kubernetes.namespace\":\"${namespace}\"}" +``` + +需要提前手动在kubernetes上启动kubernetes session + +``` +$FLINK_HOME/bin/kubernetes-session.sh -Dkubernetes.cluster-id=flink-session-test -Dclassloader.resolve-order=parent-first -Dkubernetes.container.image=${image_name} +``` + +注意:需要提前构建chunjun镜像 + +## Kubernetes Application + +命令示例: + +``` +bin/chunjun-kubernetes-application.sh \ + -jobType sync \ + -job chunjun-examples/json/stream/stream.json \ + -jobName kubernetes-job \ + -remoteChunJunDistDir chunjun-dist \ + -remotePluginPath /opt/chunjun-dist \ + -pluginLoadMode classpath \ + -flinkLibDir $FLINK_HOME/lib \ + -flinkConfDir $FLINK_HOME/conf \ + -confProp "{\"kubernetes.config.file\":\"${kubernetes_config_path}\",\"kubernetes.container.image\":\"${image_name}\",\"kubernetes.namespace\":\"${namespace}\"}" +``` + +注意:需要提前构建chunjun镜像 + # docker 构建 执行如下命令,执行完成后在本地生成一个名为 chunjun-master的镜像(注意:需要预先完成maven打包)