Skip to content

Latest commit

 

History

History
44 lines (37 loc) · 1.42 KB

File metadata and controls

44 lines (37 loc) · 1.42 KB

This template shows the installation of Karpenter in the cluster

Install the metric server

kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml

Test the autoscaling

Adjust the deployment replicas

kubectl scale deplyoment --replicas=10 autoscaling-test

Observe the node scaling

Troubeshooting

  • Terraform plan/apply fail duie to REST

    ╷
    │ Error: Failed to construct REST client
    │ 
    │   with kubernetes_manifest.karpenter_ec2nodeclass,
    │   on karpenter.tf line 54, in resource "kubernetes_manifest" "karpenter_ec2nodeclass":
    │   54: resource "kubernetes_manifest" "karpenter_ec2nodeclass" {
    │ 
    │ cannot create REST client: no client config
    ╵
    ╷
    │ Error: Failed to construct REST client
    │ 
    │   with kubernetes_manifest.karpenter_nodepool,
    │   on karpenter.tf line 120, in resource "kubernetes_manifest" "karpenter_nodepool":
    │  120: resource "kubernetes_manifest" "karpenter_nodepool" {
    │ 
    │ cannot create REST client: no client config
    ╵

    Since this resource require API access, Terraform need the API, i.e. the EKS cluster to be ready during plan staged.

    Therefore, comment out this section and apply again when the rest of the deployment is completed

    Reference: hashicorp/terraform-provider-kubernetes#1775 (comment)

    Idea wanted!