Skip to main content
Version: 1.1.0

Configure Smart Karpenter for LKE Enterprise

LKE Enterprise is supported starting from Smart Karpenter version 1.1.0.

As LKE does not support external nodes, Smart Karpenter creates dedicated LKE NodePools to dynamically scale the cluster by adding or removing nodes. These NodePools are tagged for identification, and Smart Karpenter does not modify any existing NodePools.

Install and Configure the Smart Karpenter

info

You must have helm and kubectl configured on the target cluster.

  1. Ensure that you have image pull secret credentials from Avesha Sales.

  2. Add the Helm repository by using the following commands:

    helm repo add smartscaler https://smartscaler.nexus.aveshalabs.io/repository/smartscaler-helm-ent-prod
    helm repo update
  3. To view the Smart Karpenter charts, use the following command:

    helm search repo avesha-karpenter
  4. Create a values.yaml file as shown below and set the parameters.

    1. Set the cloudProvider, linode object, and imagePullSecrets and imageCredentials.
    2. Use the credentials that you received from Avesha Sales for the imageCredentials object parameters.
    cloudProvider: "linode" # Cloud Provider. For LKE Enterprise, the value must be linode. 

    linode: # Linode controller and its environment
    controller: # controller for the Linode environment
    env: # Linode environment
    - name: CLUSTER_NAME # name variable for the Linode cluster
    value: "lkee-smart-karpenter" # name of the Linode cluster
    - name: LINODE_ENTERPRISE # enterprise variable for your environment
    value: "true" # boolean value for the enterprise variable; set it to true.

    imagePullSecrets:
    name: "<name for secrets>" #user-defined name for image pull secrets

    imageCredentials: # provide server, username and password here for image pull
    registry: "<registry name>" # Name of the registry as received from Avesha Sales
    username: "<user name>" # user name that you receive from Avesha Sales
    password: "<password>" # password that you receive from Avesha Sales
  5. Retrieve the values.yaml file from the repository you added using the following command:

    helm show values smartscaler/avesha-karpenter > values.yaml
  6. Install Smart Karpenter using the values.yaml file in following command:

    helm install karpenter smartscaler/avesha-karpenter -f values.yaml --namespace smart-scaler --create-namespace
  7. Deploy at least one NodePool on the Linode cluster. Refer to the the NodePool example below.

    apiVersion: karpenter.sh/v1
    kind: NodePool
    metadata:
    name: default
    spec:
    template:
    spec:
    requirements:
    - key: kubernetes.io/arch
    operator: In
    values: ["amd64"]
    - key: kubernetes.io/os
    operator: In
    values: ["linux"]
    - key: node.kubernetes.io/instance-type
    operator: NotIn
    values: ["g6-dedicated-64", "g7-premium-64"]
    - key: karpenter.linode.sh/instance-family
    operator: NotIn
    values: ["premium"]
    expireAfter: 720h # 30 * 24h = 720h
    limits:
    cpu: 1000
    disruption:
    consolidationPolicy: WhenEmptyOrUnderutilized
    consolidateAfter: 30s
    weight: 20
  8. Save the NodePool as a file and deploy it using the following command:

    kubectl apply -f <nodepool.yaml>