5 ms·
You can use affinity to assign pods to nodes. https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity https://kubernetes.i
by dankohn1 7y ago
You can use affinity to assign pods to nodes. https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity https://kubernetes.io/docs/concepts/configuration/assign-pod...
But if you want several containers to always be deployed together, you want to put them in the same pod. You do this in the deployment yaml.
https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/ https://kubernetes.io/docs/concepts/workloads/pods/pod-overv...
https://kubernetes.io/docs/tasks/run-application/run-stateless-application-deployment/ https://kubernetes.io/docs/tasks/run-application/run-statele...
- streetcat1 7y agoSo there are two types of affinity: Node affinity and Pod affinity. Node affinity would tell the scheduler to prefer a Node. Pod Affinity would tell the scheduler to prefer other Pods location.
- sk0g 7y agoI've learned more from your two lines than I did reading through three different entries in the K8s wiki, all of which are rather long. Or rather, it's only clicked now. Thanks!