tillrohrmann commented on a change in pull request #15248:
URL: https://github.com/apache/flink/pull/15248#discussion_r598942648



##########
File path: 
docs/content.zh/docs/deployment/resource-providers/standalone/kubernetes.md
##########
@@ -218,11 +218,19 @@ data:
 Moreover, you have to start the JobManager and TaskManager pods with a service 
account which has the permissions to create, edit, delete ConfigMaps.
 See [how to configure service accounts for 
pods](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/)
 for more information.
 
+When the High-Availability is enabled, JobManager pods should be started with 
IP address instead of Kubernetes service as its `jobmanager.rpc.address`.

Review comment:
       ```suggestion
   When High-Availability is enabled, Flink will use its own HA-services for 
service discovery. Therefore, JobManager pods should be started with their IP 
address instead of a Kubernetes service as its `jobmanager.rpc.address`.
   ```

##########
File path: 
docs/content.zh/docs/deployment/resource-providers/standalone/kubernetes.md
##########
@@ -404,6 +412,63 @@ spec:
             path: log4j-console.properties
 ```
 
+`jobmanager-session-deployment-ha.yaml`
+```yaml
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: flink-jobmanager
+spec:
+  replicas: 1 # Set the value to greater than 1 to start standby JobManagers
+  selector:
+    matchLabels:
+      app: flink
+      component: jobmanager
+  template:
+    metadata:
+      labels:
+        app: flink
+        component: jobmanager
+    spec:
+      containers:
+      - name: jobmanager
+        image: apache/flink:{{< stable >}}{{< version >}}-scala{{< 
scala_version >}}{{< /stable >}}{{< unstable >}}latest{{< /unstable >}}
+        env:
+        - name: POD_IP
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: status.podIP
+        args: ["jobmanager", "$(POD_IP)"]

Review comment:
       Or better, that this overwrites the value configured in the 
configuration config map.

##########
File path: 
docs/content.zh/docs/deployment/resource-providers/standalone/kubernetes.md
##########
@@ -218,11 +218,19 @@ data:
 Moreover, you have to start the JobManager and TaskManager pods with a service 
account which has the permissions to create, edit, delete ConfigMaps.
 See [how to configure service accounts for 
pods](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/)
 for more information.
 
+When the High-Availability is enabled, JobManager pods should be started with 
IP address instead of Kubernetes service as its `jobmanager.rpc.address`.
+Refer to the [appendix](#appendix) for full configuration.
+
+#### Standby JobManagers
+
+Usually, it is enough to only have one JobManager. Since Kubernetes will 
launch a new one once the current JobManager pod crashed exceptionally.

Review comment:
       ```suggestion
   Usually, it is enough to only start a single JobManager pod, because 
Kubernetes will restart it once the pod crashes.
   ```

##########
File path: 
docs/content.zh/docs/deployment/resource-providers/standalone/kubernetes.md
##########
@@ -218,11 +218,19 @@ data:
 Moreover, you have to start the JobManager and TaskManager pods with a service 
account which has the permissions to create, edit, delete ConfigMaps.
 See [how to configure service accounts for 
pods](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/)
 for more information.
 
+When the High-Availability is enabled, JobManager pods should be started with 
IP address instead of Kubernetes service as its `jobmanager.rpc.address`.
+Refer to the [appendix](#appendix) for full configuration.
+
+#### Standby JobManagers
+
+Usually, it is enough to only have one JobManager. Since Kubernetes will 
launch a new one once the current JobManager pod crashed exceptionally.
+If you want to achieve faster recovery, configure the `replicas` in 
`jobmanager-session-deployment-ha.yaml` or `parallelism` in 
`jobmanager-application-ha.yaml` to a value greater than one to start standby 
JobManagers.
+
 ### Enabling Queryable State
 
 You can access the queryable state of TaskManager if you create a `NodePort` 
service for it:
   1. Run `kubectl create -f taskmanager-query-state-service.yaml` to create 
the `NodePort` service for the `taskmanager` pod. The example of 
`taskmanager-query-state-service.yaml` can be found in 
[appendix](#common-cluster-resource-definitions).
-  2. Run `kubectl get svc flink-taskmanager-query-state` to get the 
`&lt;node-port&gt;` of this service. Then you can create the 
[QueryableStateClient(&lt;public-node-ip&gt;, &lt;node-port&gt;]({{< ref 
"docs/dev/datastream/fault-tolerance/queryable_state" >}}#querying-state) to 
submit the state queries.
+  2. Run `kubectl get svc flink-taskmanager-query-state` to get the 
`<node-port>` of this service. Then you can create the 
[QueryableStateClient(&lt;public-node-ip&gt;, &lt;node-port&gt;]({{< ref 
"docs/dev/datastream/fault-tolerance/queryable_state" >}}#querying-state) to 
submit the state queries.

Review comment:
       ```suggestion
     2. Run `kubectl get svc flink-taskmanager-query-state` to get the 
`<node-port>` of this service. Then you can create the 
[QueryableStateClient(&lt;public-node-ip&gt;, &lt;node-port&gt;]({{< ref 
"docs/dev/datastream/fault-tolerance/queryable_state" >}}#querying-state) to 
submit state queries.
   ```

##########
File path: 
docs/content.zh/docs/deployment/resource-providers/standalone/kubernetes.md
##########
@@ -404,6 +412,63 @@ spec:
             path: log4j-console.properties
 ```
 
+`jobmanager-session-deployment-ha.yaml`
+```yaml
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: flink-jobmanager
+spec:
+  replicas: 1 # Set the value to greater than 1 to start standby JobManagers
+  selector:
+    matchLabels:
+      app: flink
+      component: jobmanager
+  template:
+    metadata:
+      labels:
+        app: flink
+        component: jobmanager
+    spec:
+      containers:
+      - name: jobmanager
+        image: apache/flink:{{< stable >}}{{< version >}}-scala{{< 
scala_version >}}{{< /stable >}}{{< unstable >}}latest{{< /unstable >}}
+        env:
+        - name: POD_IP
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: status.podIP
+        args: ["jobmanager", "$(POD_IP)"]

Review comment:
       Maybe add a comment that this will set the `POD_IP` as 
`jobmanager.rpc.address`.

##########
File path: 
docs/content.zh/docs/deployment/resource-providers/standalone/kubernetes.md
##########
@@ -218,11 +218,19 @@ data:
 Moreover, you have to start the JobManager and TaskManager pods with a service 
account which has the permissions to create, edit, delete ConfigMaps.
 See [how to configure service accounts for 
pods](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/)
 for more information.
 
+When the High-Availability is enabled, JobManager pods should be started with 
IP address instead of Kubernetes service as its `jobmanager.rpc.address`.
+Refer to the [appendix](#appendix) for full configuration.
+
+#### Standby JobManagers
+
+Usually, it is enough to only have one JobManager. Since Kubernetes will 
launch a new one once the current JobManager pod crashed exceptionally.
+If you want to achieve faster recovery, configure the `replicas` in 
`jobmanager-session-deployment-ha.yaml` or `parallelism` in 
`jobmanager-application-ha.yaml` to a value greater than one to start standby 
JobManagers.

Review comment:
       ```suggestion
   If you want to achieve faster recovery, configure the `replicas` in 
`jobmanager-session-deployment-ha.yaml` or `parallelism` in 
`jobmanager-application-ha.yaml` to a value greater than `1` to start standby 
JobManagers.
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to