Skip to content

Commit

Permalink
[doc-快速开始][docs_zh]quickstart add content about k8s
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzhuangjia committed Aug 4, 2022
1 parent d6cb72a commit 7bbad56
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions docs_zh/快速开始.md
Original file line number Diff line number Diff line change
Expand Up @@ -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打包)
Expand Down

0 comments on commit 7bbad56

Please sign in to comment.