How to get flink streaming jar to kubernetes

1/9/2019

With maven am building a fat jar for my streaming app. Have to deploy the jar to a k8 cluster. Enterprise don't have internal docker hub. So my option is to build the image as part of jenkins and use the same in kub job manager config. I would appreciate if any example demonstrating the project layout and steps to deploy

Used the build.sh script from https://github.com/apache/flink/blob/release-1.7/flink-container/docker/README.md and able to convert to docker image. And using docker compose am able to get the app running. But when trying for kub as specified in https://github.com/apache/flink/blob/release-1.7/flink-container/kubernetes/README.md#deploy-flink-job-cluster am seeing image not found.

-- user3216865
flink-streaming
kubernetes

1 Answer

1/16/2019

Kubernetes does not manage images, it relies on Docker for that. You can check the Docker documentation About images, containers, and storage drivers.

In Kubernetes You can use the following registries: Google Container Registry, AWS EC2 Container Registry, Azure Container Registry, IBM Cloud Container Registry and your own Private Registry

You can read the Kubernetes documentation on how to Pull an Image from a Private Registry

You can find many projects helping with the setup of your own private registry. One of the easiest ones is the project k8s-local-docker-registry by SeldonIO.

Start/Stop private registry in cluster

start private registry ./start-docker-private-registry

stop private registry ./stop-docker-private-registry

Check if the registry catalog can be accessed and the ability to push an image. (set -x && curl -X GET http://127.0.0.1:5000/v2/_catalog && docker pull busybox && docker tag busybox 127.0.0.1:5000/busybox && docker push 127.0.0.1:5000/busybox)

-- Crou
Source: StackOverflow