EKS Cluster
How to Optimize AWS Managed Kubernetes Clusters (EKS)
1. Download Kaytu CLI
MacOS
brew tap kaytu-io/cli-tap && brew install kaytu
Linux
curl -fsSL https://raw.githubusercontent.com/kaytu-io/kaytu/main/scripts/install.sh | sh
Windows (and all Binaries) Download Windows (Linux, and MacOS) binary from releases
2. Login to kaytu CLI
kaytu login
Install the Kaytu CLI plugin
kaytu plugin install kubernetes
3. Login to AWS CLI
If you don't have AWS CLI, go here and install it.
Run to confirm you are logged in to the correct account
aws sts get-caller-identity
4. Authenticate to Kubernetes Cluster
aws eks update-kubeconfig --region [region-code] --name [my-cluster]
Replace my-cluster with the cluster name and region code.
Run
kubectl get pods
to confirm you are connected to the cluster
5. Install Kubernetes Agent
5a. Generate Enrollment Keys
Enrollment keys allow the Kubernetes cluster to get optimization results from the Kaytu platform.
kaytu apikey generate [cluster-name]
Replace Cluster name with the Kubernetes Cluster.
Please copy the enrollment key provided. Unfortunately, you won't be able to view the key at a later time.
5b. Add Helm Repo
helm repo add kaytu-io https://kaytu-io.github.io/kaytu-charts
Once that completes, we can run update Charts:
helm repo update
5c. Populate the values.yaml
In values.yaml file, please make sure the following variables are correctly configured:
kaytu.kaytu.authToken
needs to be populated with the key generated in Step 4.
kaytu.kaytu.prometheus.address
needs to be pointed to the Prometheus endpoint.
5d. Install the Chart
This will create a namespace if one doesn't exist for Kaytu
helm install --create-namespace -n kaytu-system my-kaytu-agent kaytu-io/kaytu-agent -f values.yaml
5e. Wait for optimization
Check the logs and wait for the optimization cycle to be over
kubectl logs -f kaytu-agent-0
Wait for the log containing the optimization cycle to be completed.
6. Run optimization Checks
kaytu optimize kubernetes
