kind: Provisioner

From wikieduonline
Jump to navigation Jump to search

kind: Provisioner

Official Karpenter provisioner example[edit]

kind: Provisioner
  name: default
  # References cloud provider-specific custom resource, see your cloud provider specific documentation
    name: default

  # Provisioned nodes will have these taints
  # Taints may prevent pods from scheduling if they are not tolerated by the pod.
    - key:
      effect: NoSchedule

  # Provisioned nodes will have these taints, but pods do not need to tolerate these taints to be provisioned by this
  # provisioner. These taints are expected to be temporary and some other entity (e.g. a DaemonSet) is responsible for
  # removing the taint after it has finished initializing the node.
    - key:
      effect: NoSchedule

  # Labels are arbitrary key-values that are applied to all nodes
    billing-team: my-team

  # Requirements that constrain the parameters of provisioned nodes.
  # These requirements are combined with pod.spec.affinity.nodeAffinity rules.
  # Operators { In, NotIn } are supported to enable including or excluding values
    - key: ""
      operator: In
      values: ["c", "m", "r"]
    - key: ""
      operator: In
      values: ["4", "8", "16", "32"]
    - key: ""
      operator: In
      values: ["nitro"]
    - key: ""
      operator: In
      values: ["us-west-2a", "us-west-2b"]
    - key: ""
      operator: In
      values: ["arm64", "amd64"]
    - key: "" # If not included, the webhook for the AWS cloud provider will default to on-demand
      operator: In
      values: ["spot", "on-demand"]

  # Karpenter provides the ability to specify a few additional Kubelet args.
  # These are all optional and provide support for additional customization and use cases.
    clusterDNS: [""]
    containerRuntime: containerd
      cpu: 100m
      memory: 100Mi
      ephemeral-storage: 1Gi
      cpu: 200m
      memory: 100Mi
      ephemeral-storage: 3Gi
      memory.available: 5%
      nodefs.available: 10%
      nodefs.inodesFree: 10%
      memory.available: 500Mi
      nodefs.available: 15%
      nodefs.inodesFree: 15%
      memory.available: 1m
      nodefs.available: 1m30s
      nodefs.inodesFree: 2m
    evictionMaxPodGracePeriod: 3m
    podsPerCore: 2
    maxPods: 20

  # Resource limits constrain the total size of the cluster.
  # Limits prevent Karpenter from creating new instances once the limit is exceeded.
      cpu: "1000"
      memory: 1000Gi

  # Enables consolidation which attempts to reduce cluster cost by both removing un-needed nodes and down-sizing those
  # that can't be removed.  Mutually exclusive with the ttlSecondsAfterEmpty parameter.
    enabled: true

  # If omitted, the feature is disabled and nodes will never expire.  If set to less time than it requires for a node
  # to become ready, the node may expire before any pods successfully start.
  ttlSecondsUntilExpired: 2592000 # 30 Days = 60 * 60 * 24 * 30 Seconds;

  # If omitted, the feature is disabled, nodes will never scale down due to low utilization
  ttlSecondsAfterEmpty: 30

  # Priority given to the provisioner when the scheduler considers which provisioner
  # to select. Higher weights indicate higher priority when comparing provisioners.
  # Specifying no weight is equivalent to specifying a weight of 0.
  weight: 10


See also[edit]