Skip to content

Instantly share code, notes, and snippets.

@songbinliu
Last active June 12, 2017 13:21
Show Gist options
  • Save songbinliu/4308559ecce02d63359f0fb89690135a to your computer and use it in GitHub Desktop.
Save songbinliu/4308559ecce02d63359f0fb89690135a to your computer and use it in GitHub Desktop.
scheduler gap from OpsMgr to Kubernetes

Node Affinity/anti-Affinity

Type description supported date
equal Node[Key] = value Yes 2017.03.01
In Node[Key] IN [v1, v2 …] No -
NotIn Node[Key] NotIn [v1, v2, …] No -
Exists Node.Key Exists Yes -
DoesNotExists Node.Key DoesNotExists No -
Gt Node[Key] Greater than Value No -
Lt Node[Key] Less than Value No -

Taints and Tolerations

Type description supported date
Taint marks on Node, which is used to excluse Pods that do not have the corresponding Tolerations. No -
Toleration marks on Pod, which enable the Pod to be scheduled to the Tainted Nodes. No -

Pod Affinity/anti-Affinity

Type description supported date
Affinity Pod should be in the same domain(host, cluster, or region) with the target Pods (via labelSelector). No -
Anti-Affinity Pod should not be in the same donmain. No -

Default Resource Limit

how to support limits that are imposed in the namespace.

Horizontal Pod Autoscaler

An Autoscaler can automatically increase or decrease number of pods deployed (by Deployment, ReplicaSet, or ReplicationController ) within the system as needed. AutoScaler sets the upper and lower limit of the number of Pods. Here is more details about its design. Here is a use case:

apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
  name: frontend-scaler
spec:
  scaleTargetRef:
    kind: ReplicaSet
    name: frontend
  minReplicas: 3
  maxReplicas: 10
  targetCPUUtilizationPercentage: 50

OpsMgr should know the limits when to add a new Pod or remove an idle Pod.

Resource Quota

A resource quota, defined by a ResourceQuota object, provides constraints that limit aggregate resource consumption per namespace. It can limit the quantity of objects that can be created in a namespace by type, as well as the total amount of compute resources that may be consumed by resources in that project. https://kubernetes.io/docs/concepts/policy/resource-quotas/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment