Configure Linkerd and Cluster Autoscaler

On this page

  1. Annotate the default namespace for Linkerd
  2. Install the Cluster Autoscaler

Annotate the default namespace for Linkerd

Linkerd must be installed as part of the Terraform infrastructure deployment before completing these steps. Annotating the default namespace enables Linkerd mTLS on all microservices deployed in the following steps.

  1. Annotate the default namespace:

    kubectl annotate namespace default "linkerd.io/inject=enabled"
    

    linkerd

  2. Verify the annotation is in place:

    kubectl get namespace default -o=jsonpath='{.metadata.annotations}'
    

    The output should include {"linkerd.io/inject":"enabled"}.

  3. If this is an update rather than a new install, restart the application pods in the default namespace so that Linkerd sidecars are injected. Restarted pods should show 2/2 in the ready column.

Install the Cluster Autoscaler

The Cluster Autoscaler is a Helm chart that horizontally scales cluster nodes as needed. Update the following values in charts/cluster-autoscaler/values.yaml with values from the AWS console:

clusterName: <EXAMPLE_EKS_CLUSTER_NAME>
autoscalingGroups:
  - name: <EXAMPLE_AWS_AUTOSCALING_GROUP_NAME>
    maxSize: 5
    minSize: 3
awsRegion: us-east-1

Install the chart:

helm repo add autoscaler https://kubernetes.github.io/autoscaler
helm upgrade --install cluster-autoscaler autoscaler/cluster-autoscaler \
  -f ./cluster-autoscaler/values.yaml \
  --namespace kube-system

Verify the pod is running:

kubectl --namespace=kube-system get pods \
  -l "app.kubernetes.io/name=aws-cluster-autoscaler,app.kubernetes.io/instance=cluster-autoscaler"

Back to top

© Centers for Disease Control and Prevention (CDC). All Rights Reserved.