What is the objective of the nodes in Kubernetes?

8/1/2018

Could someone tell me What is the objective of the nodes in Kubernetes?.

I have other question. When I deployed in kubenernetes from my local machine I'm do it trhought Deployment with the next commands.

docker push  ecpregistrydev.azurecr.io/travelexpensesparametroapi:latest
kubectl run travelexpensesparametroapi --image=ecpregistrydev.azurecr.io/travelexpensesparametroapi:latest --replicas=2 --labels app=apiparametros
kubectl expose  deployments travelexpensesparametroapi  --port=80 --name=servicio-parametros --type=NodePort

So I create a deployment with two replicas but this replicas only happend in one node. How to can I get replicas between different nodes? This is because if one node get down the other node still keep alive and my services working.

-- Felix David Hernandez Aldana
asp.net-core
azure
kubernetes

1 Answer

8/2/2018

Node is a server running your containers, basically a worker. To put pods on different nodes you need to use anti-affinity concept:

https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
http://techgenix.com/affinity-and-anti-affinity-explained/

-- 4c74356b41
Source: StackOverflow