Running your API on Kubernetes
From this point, you can choose the Kubernetes deployment type you like the most (local or cloud-based) to run our API. The following examples will be shown with AWS but you also can choose another cloud provider. Feel free to do so.
Now, it is time to retake the API we built in Chapter 1 and ship it to production. We developed a simple API that, when requested, can say hello to you or answer with a (very cool) joke.
We already have the code for the API (https://github.com/PacktPublishing/Bigdata-on-Kubernetes/blob/main/Chapter01/app/main.py) and the Dockerfile to build the container image (https://github.com/PacktPublishing/Bigdata-on-Kubernetes/blob/main/Chapter01/Dockerfile).
For the image to be accessible to Kubernetes, it should be available on a container registry. Each cloud provider has a registry but to make things simple, we are working with DockerHub (https://hub.docker.com/). So long as your images are public, you can store as many...