azagrebin commented on a change in pull request #12131:
URL: https://github.com/apache/flink/pull/12131#discussion_r425765241



##########
File path: docs/ops/deployment/kubernetes.md
##########
@@ -76,57 +74,92 @@ You can then access the Flink UI via different ways:
     {% highlight bash %}./bin/flink run -m localhost:8081 
./examples/streaming/WordCount.jar{% endhighlight %}
 
 *  Create a `NodePort` service on the rest service of jobmanager:
-    1. Run `kubectl create -f jobmanager-rest-service.yaml` to create the 
`NodePort` service on jobmanager. The example of `jobmanager-rest-service.yaml` 
can be found in [appendix](#session-cluster-resource-definitions).
+    1. Run `kubectl create -f jobmanager-rest-service.yaml` to create the 
`NodePort` service on jobmanager. The example of `jobmanager-rest-service.yaml` 
can be found in [appendix](#common-cluster-resource-definitions).
     2. Run `kubectl get svc flink-jobmanager-rest` to know the `node-port` of 
this service and navigate to 
[http://&lt;public-node-ip&gt;:&lt;node-port&gt;](http://<public-node-ip>:<node-port>)
 in your browser.
-    3. Similarly to `port-forward` solution, you could also use the following 
command below to submit jobs to the cluster:
+    3. If you use minikube, you can get its public ip by running `minikube ip`.
+    4. Similarly to `port-forward` solution, you could also use the following 
command below to submit jobs to the cluster:
 
         {% highlight bash %}./bin/flink run -m <public-node-ip>:<node-port> 
./examples/streaming/WordCount.jar{% endhighlight %}
 
-In order to terminate the Flink session cluster, use `kubectl`:
+In order to terminate the Flink cluster, terminate the specific 
[Session](#deploy-session-cluster) or [Job](#deploy-job-cluster) cluster 
components
+and use `kubectl` to terminate the common components:
 
-    kubectl delete -f jobmanager-deployment.yaml
-    kubectl delete -f taskmanager-deployment.yaml
+```sh
     kubectl delete -f jobmanager-service.yaml
     kubectl delete -f flink-configuration-configmap.yaml
+    # if created then also the rest service
+    kubectl delete -f jobmanager-rest-service.yaml
+```
+
+### Deploy Session Cluster
+
+A Flink Session cluster is executed as a long-running Kubernetes Deployment.
+Note that you can run multiple Flink jobs on a Session cluster.
+Each job needs to be submitted to the cluster after the cluster has been 
deployed.
 
-## Flink job cluster on Kubernetes
+A basic Flink Session cluster deployment in Kubernetes has three components:
 
-A Flink job cluster is a dedicated cluster which runs a single job.
-The job is part of the image and, thus, there is no extra job submission 
needed.
+* a Deployment which runs a Flink Master
+* a Deployment for a pool of TaskManagers
+* a Service exposing the Flink Master's REST and UI ports
 
-### Creating the job-specific image
+After creating [the common cluster 
components](#deploy-flink-cluster-on-kubernetes), use [the Session specific 
resource definitions](#session-cluster-resource-definitions)
+to launch the Session cluster with the `kubectl` command:
 
-The Flink job cluster image needs to contain the user code jars of the job for 
which the cluster is started.
-Therefore, one needs to build a dedicated container image for every job.
-Please follow these [instructions](https://github.com/apache/flink/blob/{{ 
site.github_branch }}/flink-container/docker/README.md) to build the Docker 
image.
+```sh
+    kubectl create -f jobmanager-session-deployment.yaml
+    kubectl create -f taskmanager-session-deployment.yaml
+```
 
-### Using plugins
+To terminate the Session cluster, these components can be deleted before [the 
common ones](#deploy-flink-cluster-on-kubernetes) with the `kubectl` command:

Review comment:
       Asaik, in general you can create and remove resources in an unordered 
way in k8s.
   I can change this:
   `before` -> `along with`




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to