- How do I get a pod in a specific namespace?
- What is affinity vs node selector?
- What is the difference between nodeAffinity and Podaffinity?
- What is topologyKey in pod affinity?
How do I get a pod in a specific namespace?
We can list all of the pods, services, stateful sets, and other resources in a namespace by using the kubectl get all command. As a result, you may use this command to see the pods, services, and stateful sets in a specific namespace.
What is affinity vs node selector?
Node affinity enables a conditional approach with logical operators in the matching process, while nodeSelector is limited to looking for exact label key-value pair matches. Node affinity is specified in the PodSpec using the nodeAffinity field in the affinity section.
What is the difference between nodeAffinity and Podaffinity?
Node Affinity ensures that pods are hosted on particular nodes. Pod Affinity ensures two pods to be co-located in a single node.
What is topologyKey in pod affinity?
topologyKey is the key of node labels. If two Nodes are labelled with this key and have identical values for that label, the scheduler treats both Nodes as being in the same topology. The scheduler tries to place a balanced number of Pods into each topology domain.