How can i set up workers in kubernetes (infrastructure questions) How can i set up workers in kubernetes (infrastructure questions) kubernetes kubernetes

How can i set up workers in kubernetes (infrastructure questions)


follow the below reference and setup kubernetes cluster using kubeadm.

https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/

using 'kubeadm join' command you should be able to add worker nodes to the master.above given link has steps to join the worker to master


If you are using Azure, you can try exploring AKS. It works out of the box. You just need to configure kubectl and you will be good to go.

Regarding deploying multiple microservices(API), you can deploy each microservice as a separate k8s deployment using kubectl and expose them using a service. This way they can communicate with each other using exposed endpoints(API) or a message queue .

Here is a quick guide you can take help from : https://dzone.com/articles/quick-guide-to-microservices-with-kubernetes-sprin


Typically you should use only one container per pod. Multiple containers per pod are possible but are typically used for sidecars, not for additional APIs.

You expose your services using kubernetes services, no need to run everything on a different port if you don't want to.

A minimal setup for typicall webapi calls would look something like this (if you expose your API service as public LoadBalancer you don't necessarily need Ingress)

Client -> (Ingress) -> API service -> API deployment pod(s) -> internal services -> deployment pods.

You can access your internal services from within your cluster using http(s)://servicename[:custom-port]

On the other hand, if you simply use flask to forward API calls to other services, you might want to replace it with an Ingress Controller that does all the routing for you.