In this section, we will build a whole new service in Python (API gateway) to demonstrate that Kubernetes is really language-agnostic. Then, we will add user authentication via OAuth2 and expose the API gateway service externally.
Providing and consuming a public REST API
Building a Python-based API gateway service
The API gateway service is designed to receive all requests from outside the cluster and route them to the proper services. Here is the directory's structure:
$ tree
.
├── Dockerfile
├── README.md
├── api_gateway_service
│ ├── __init__.py
│ ├── api.py
│ ├──...