rmetzger commented on a change in pull request #14346: URL: https://github.com/apache/flink/pull/14346#discussion_r542212468
########## File path: docs/deployment/resource-providers/standalone/kubernetes.md ########## @@ -23,45 +23,53 @@ specific language governing permissions and limitations under the License. --> -This page describes how to deploy a *Flink Job* and *Session cluster* on [Kubernetes](https://kubernetes.io). - * This will be replaced by the TOC {:toc} -{% info %} This page describes deploying a [standalone]({% link deployment/resource-providers/standalone/index.md %}) Flink cluster on top of Kubernetes. -You can find more information on native Kubernetes deployments [here]({% link deployment/resource-providers/native_kubernetes.md %}). -## Setup Kubernetes +## Getting Started + +This *Getting Started* guide describes how to deploy a *Session cluster* on [Kubernetes](https://kubernetes.io). + +### Introduction + +This page describes deploying a [standalone]({% link deployment/resource-providers/standalone/index.md %}) Flink cluster on top of Kubernetes, using Flink's standalone deployment. +We generally recommend new users to deploy Flink on Kubernetes using [native Kubernetes deployments]({% link deployment/resource-providers/native_kubernetes.md %}). -Please follow [Kubernetes' setup guide](https://kubernetes.io/docs/setup/) in order to deploy a Kubernetes cluster. -If you want to run Kubernetes locally, we recommend using [MiniKube](https://kubernetes.io/docs/setup/minikube/). +### Preparation + +This guide expects a Kubernetes environment to be present. You can ensure that your Kubernetes setup is working by running a command like `kubectl get nodes`, which lists all connected Kubelets. + +If you want to run Kubernetes locally, we recommend using [MiniKube](https://minikube.sigs.k8s.io/docs/start/). <div class="alert alert-info" markdown="span"> <strong>Note:</strong> If using MiniKube please make sure to execute `minikube ssh 'sudo ip link set docker0 promisc on'` before deploying a Flink cluster. Otherwise Flink components are not able to self reference themselves through a Kubernetes service. </div> -## Flink Docker image +### Starting a Kubernetes Cluster (Session Mode) + +A *Flink Session cluster* is executed as a long-running Kubernetes Deployment. 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. -Before deploying the Flink Kubernetes components, please read [the Flink Docker image documentation]({% link deployment/resource-providers/standalone/docker.md %}), -[its tags]({% link deployment/resource-providers/standalone/docker.md %}#image-tags), [how to customize the Flink Docker image]({% link deployment/resource-providers/standalone/docker.md %}#customize-flink-image) and -[enable plugins]({% link deployment/resource-providers/standalone/docker.md %}#using-plugins) to use the image in the Kubernetes definition files. +A *Flink Session cluster* deployment in Kubernetes has at least three components: -## Deploy Flink cluster on Kubernetes +* a *Deployment* which runs a [JobManager]({% link concepts/glossary.md %}#flink-jobmanager) +* a *Deployment* for a pool of [TaskManagers]({% link concepts/glossary.md %}#flink-taskmanager) +* a *Service* exposing the *JobManager's* REST and UI ports -Using [the common resource definitions](#common-cluster-resource-definitions), launch the common cluster components -with the `kubectl` command: +Using the file contents provided in the [the common resource definitions](#common-cluster-resource-definitions), create the following files, and create the respective components with the `kubectl` command: ```sh + # Configuration and service definition kubectl create -f flink-configuration-configmap.yaml kubectl create -f jobmanager-service.yaml + # Create the deployments for the cluster + kubectl create -f jobmanager-session-deployment.yaml + kubectl create -f taskmanager-session-deployment.yaml ``` -Note that you could define your own customized options of `flink-conf.yaml` within `flink-configuration-configmap.yaml`. - -Then launch the specific components depending on whether you want to deploy a [Session](#deploy-session-cluster) or [Job](#deploy-job-cluster) cluster. - -You can then access the Flink UI via different ways: +You can then access the Flink UI and submit jobs via different ways: Review comment: I'm always a fan of making the getting started guide shorter and easier ;) ---------------------------------------------------------------- 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]
