diff --git a/docs/reference/addons/flink-kubernetes-operator.md b/docs/reference/addons/flink-kubernetes-operator.md index 0b849bc6511..d25f030dba7 100644 --- a/docs/reference/addons/flink-kubernetes-operator.md +++ b/docs/reference/addons/flink-kubernetes-operator.md @@ -34,29 +34,32 @@ addon-fluxcd flux-system-namespace raw Show the component type `flink-cluster`, so we know how to use it in one application. As a Flink user, you can choose the parameter to set for your Flink cluster ```shell vela show flink-cluster -# Properties -+--------------+-------------+--------+----------+---------------------------------------------------------------+ -| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | -+--------------+-------------+--------+----------+---------------------------------------------------------------+ -| name | | string | true | | -| namespace | | string | true | | -| nots | | string | true | 2 | -| flinkVersion | | string | true | v1_14 | -| image | | string | true | flink:latest | -| jarURI | | string | true | local:///opt/flink/examples/streaming/StateMachineExample.jar | -| parallelism | | int | true | 2 | -| upgradeMode | | string | true | stateless | -| replicas | | int | true | 1 | -| jmcpu | | int | true | 1 | -| jmmem | | string | true | 1024m | -| tmcpu | | int | true | 1 | -| tmmem | | string | true | 1024m | -+--------------+-------------+--------+----------+---------------------------------------------------------------+ +# Specification ++--------------+------------------------------------------------------------------------------------------------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++--------------+------------------------------------------------------------------------------------------------------+--------+----------+---------+ +| name | Specify the flink cluster name. | string | true | | +| namespace | Specify the namespace for flink cluster to install. | string | true | | +| nots | Specify the taskmanager.numberOfTaskSlots, e.g "2". | string | true | | +| flinkVersion | Specify the flink cluster version, e.g "v1_14". | string | true | | +| image | Specify the image for flink cluster to run, e.g "flink:latest". | string | true | | +| jarURI | Specify the uri for the jar of the flink cluster job, e.g | string | true | | +| | "local:///opt/flink/examples/streaming/StateMachineExample.jar". | | | | +| parallelism | Specify the parallelism of the flink cluster job, e.g 2. | int | true | | +| upgradeMode | Specify the upgradeMode of the flink cluster job, e.g "stateless". | string | true | | +| replicas | Specify the replicas of the flink cluster jobManager, e.g 1. | int | true | | +| jmcpu | Specify the cpu of the flink cluster jobManager, e.g 1. | int | true | | +| jmmem | Specify the memory of the flink cluster jobManager, e.g "1024m". | string | true | | +| tmcpu | Specify the cpu of the flink cluster taskManager, e.g 1. | int | true | | +| tmmem | Specify the memory of the flink cluster taskManager, e.g "1024m". | string | true | | ++--------------+------------------------------------------------------------------------------------------------------+--------+----------+---------+ + + ``` ## Example for how to run a component typed flink-cluster in application -First please make sure your cluster already exists namespace `flink-home`. +First please make sure your cluster already exists namespace `flink-cluster`. Then deploy the application: @@ -65,47 +68,43 @@ cat < 8081/TCP 17m + + +kubectl port-forward service/my-flink-cluster-rest 8888:8081 -n flink-cluster +Forwarding from 127.0.0.1:8888 -> 8081 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.4/reference/addons/flink-kubernetes-operator.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.4/reference/addons/flink-kubernetes-operator.md index 9ee42c4e8c0..839d0eb4c5e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.4/reference/addons/flink-kubernetes-operator.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.4/reference/addons/flink-kubernetes-operator.md @@ -33,29 +33,31 @@ addon-fluxcd flux-system-namespace raw 通过显示`flink-cluster`组件的字段类型,让我们知道如何在一个应用程序中使用它们。 作为 flink 用户,你可以选择它们作为你的 flink 集群的设置参数。 ```shell vela show flink-cluster -# Properties -+--------------+-------------+--------+----------+---------------------------------------------------------------+ -| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | -+--------------+-------------+--------+----------+---------------------------------------------------------------+ -| name | | string | true | | -| namespace | | string | true | | -| nots | | string | true | 2 | -| flinkVersion | | string | true | v1_14 | -| image | | string | true | flink:latest | -| jarURI | | string | true | local:///opt/flink/examples/streaming/StateMachineExample.jar | -| parallelism | | int | true | 2 | -| upgradeMode | | string | true | stateless | -| replicas | | int | true | 1 | -| jmcpu | | int | true | 1 | -| jmmem | | string | true | 1024m | -| tmcpu | | int | true | 1 | -| tmmem | | string | true | 1024m | -+--------------+-------------+--------+----------+---------------------------------------------------------------+ +# Specification ++--------------+------------------------------------------------------------------------------------------------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++--------------+------------------------------------------------------------------------------------------------------+--------+----------+---------+ +| name | Specify the flink cluster name. | string | true | | +| namespace | Specify the namespace for flink cluster to install. | string | true | | +| nots | Specify the taskmanager.numberOfTaskSlots, e.g "2". | string | true | | +| flinkVersion | Specify the flink cluster version, e.g "v1_14". | string | true | | +| image | Specify the image for flink cluster to run, e.g "flink:latest". | string | true | | +| jarURI | Specify the uri for the jar of the flink cluster job, e.g | string | true | | +| | "local:///opt/flink/examples/streaming/StateMachineExample.jar". | | | | +| parallelism | Specify the parallelism of the flink cluster job, e.g 2. | int | true | | +| upgradeMode | Specify the upgradeMode of the flink cluster job, e.g "stateless". | string | true | | +| replicas | Specify the replicas of the flink cluster jobManager, e.g 1. | int | true | | +| jmcpu | Specify the cpu of the flink cluster jobManager, e.g 1. | int | true | | +| jmmem | Specify the memory of the flink cluster jobManager, e.g "1024m". | string | true | | +| tmcpu | Specify the cpu of the flink cluster taskManager, e.g 1. | int | true | | +| tmmem | Specify the memory of the flink cluster taskManager, e.g "1024m". | string | true | | ++--------------+------------------------------------------------------------------------------------------------------+--------+----------+---------+ + ``` ## 在应用中运行一个 flink-cluster 类型组件的示例 -首先请确保你的集群已经存在命名空间`flink-home`。 +首先请确保你的集群已经存在命名空间`flink-cluster`。 然后部署下面的应用: ```shell @@ -63,47 +65,43 @@ cat < 8081/TCP 17m + + +kubectl port-forward service/my-flink-cluster-rest 8888:8081 -n flink-cluster +Forwarding from 127.0.0.1:8888 -> 8081 + -你会看到你的第一个 flink-cluster 应用已经处于运行状态了。