diff --git a/examples/v1/general-purpose.yaml b/examples/v1/general-purpose.yaml new file mode 100644 index 000000000..3531fbc13 --- /dev/null +++ b/examples/v1/general-purpose.yaml @@ -0,0 +1,51 @@ +# This example NodePool will provision general purpose instances +--- +apiVersion: karpenter.sh/v1 +kind: NodePool +metadata: + name: general-purpose + annotations: + kubernetes.io/description: "General purpose NodePool" +spec: + disruption: + consolidateAfter: 0s + budgets: + - nodes: 30% + template: + metadata: + labels: + # required for Karpenter to predict overhead from cilium DaemonSet + kubernetes.azure.com/ebpf-dataplane: cilium + spec: + nodeClassRef: + group: karpenter.azure.com + kind: AKSNodeClass + name: default + startupTaints: + # https://karpenter.sh/docs/concepts/nodepools/#cilium-startup-taint + - key: node.cilium.io/agent-not-ready + effect: NoExecute + value: "true" + expireAfter: Never + requirements: + - key: kubernetes.io/arch + operator: In + values: ["amd64"] + - key: kubernetes.io/os + operator: In + values: ["linux"] + - key: karpenter.sh/capacity-type + operator: In + values: ["on-demand"] + - key: karpenter.azure.com/sku-family + operator: In + values: [D] +--- +apiVersion: karpenter.azure.com/v1alpha2 +kind: AKSNodeClass +metadata: + name: default + annotations: + kubernetes.io/description: "General purpose AKSNodeClass for running Ubuntu2204 nodes" +spec: + imageFamily: Ubuntu2204 diff --git a/examples/v1/system-surge.yaml b/examples/v1/system-surge.yaml new file mode 100644 index 000000000..f4741b28f --- /dev/null +++ b/examples/v1/system-surge.yaml @@ -0,0 +1,56 @@ +# This example NodePool will provision general purpose instances +--- +apiVersion: karpenter.sh/v1 +kind: NodePool +metadata: + name: system-surge + annotations: + kubernetes.io/description: "System NodePool (surge capacity)" +spec: + disruption: + consolidateAfter: 0s + budgets: + - nodes: 30% + template: + metadata: + labels: + kubernetes.azure.com/mode: "system" + # required for Karpenter to predict overhead from cilium DaemonSet + kubernetes.azure.com/ebpf-dataplane: cilium + spec: + nodeClassRef: + group: karpenter.azure.com + kind: AKSNodeClass + name: default + startupTaints: + # https://karpenter.sh/docs/concepts/nodepools/#cilium-startup-taint + - key: node.cilium.io/agent-not-ready + effect: NoExecute + value: "true" + taints: + - key: CriticalAddonsOnly + effect: NoSchedule + value: "true" + expireAfter: Never + requirements: + - key: kubernetes.io/arch + operator: In + values: ["amd64"] + - key: kubernetes.io/os + operator: In + values: ["linux"] + - key: karpenter.sh/capacity-type + operator: In + values: ["on-demand"] + - key: karpenter.azure.com/sku-family + operator: In + values: [D] +--- +apiVersion: karpenter.azure.com/v1alpha2 +kind: AKSNodeClass +metadata: + name: system-surge + annotations: + kubernetes.io/description: "General purpose AKSNodeClass for running Ubuntu2204 nodes" +spec: + imageFamily: Ubuntu2204