- 4 Minutes to read
- Print
- PDF
At the onboarding meeting
- 4 Minutes to read
- Print
- PDF
This topic describes the steps that will take place at the onboarding meeting.
These steps will be completed:
Open a user account in the Zesty platform.
Integrate (“onboard”) AWS accounts, IAM, and CURs.
Master account
Subaccount
Set up Athena
Set up IAM permissions
Install the Zesty K8s Agent Helm chart
Install the Zesty K8s Agent
The first two steps will be done together with the Zesty representative and are not documented here.
Prerequisites
crawler-cfn.yml file in the subaccount CUR S3 bucket (this is the account that will be used for the K8s onboarding)
AWS permissions:
Subaccount:
Add Zesty IAM roles with the required roles
EKS access
CUR access
Athena access
Master account:
Add Zesty IAM roles with the required roles
CUR access
The administrator client on which the Zesty K8s Agent will be installed must be able to use the following:
Required permissions
EKS v1.28 or later
Karpenter v1.0 or later
HPA
Agent permissions
Step 3 - Set up Athena
This topic describes how to set up Athena.
Use AWS to create the CloudFormation stack:
Log in to the AWS Management Console for the sub account.
Navigate to the AWS CloudFormation Console.
Click Create Stack > With new resources (standard).
In the Specify template section:
Select Amazon S3 URL.
Do one of the following:
Provide the URL to your crawler-cfn.yml file, for example:
https://<your-bucket>.s3.amazonaws.com/cloudformation/crawler-cfn.ymlDownload the file from the bucket and use it as a template.
Click Next.
Fill out the stack details, such as name, etc.
Give your stack a name like Zesty-CUR-Athena-Setup.Click Next to configure stack options (tags, permissions, etc.).
Click Create Stack.
A database will be created, with a name similar to athenacurcfn
Leave this tab open. You will need it for a future step.
Set up a new S3 bucket for the Athena query results:
In the AWS Management Console, open a new tab to the S3 Management Console.
Create the bucket:
Select Create bucket.
The Create Bucket page is displayed.
Use the same region used for the CUR bucket and pick a name like <account-id>-aws-athena-query-results-<region>Select Create bucket at the bottom of the page.
Navigate to the Amazon Athena dashboard.
Select Query editor.
Select the relevant database, with the name of the S3 bucket created earlier in this step.
Select Settings > Manage.
The Manage settings window is displayed.Set the location of query results to the S3 bucket you just created, which will look like s3://<account-id>-aws-athena-query-results-<region>
Select Save.
Note: For Athena query results written to an S3 bucket accessed only by Zesty, you can expire or delete the objects after 1 day of retention.
Leave this tab open. You will need it for a future step.
Step 4 - Set up IAM permissions via CloudFormation
This step installs the IAM roles with Zesty CloudFormation.
Download the Zesty-supplied CloudFormation template.
In the AWS Management Console, open a new tab to the CloudFormation console.
Create a new stack:
Select Create Stack then select With new resources (standard).
The Create stack page is displayed.In the Prerequisite - Prepare template section, select Choose an existing template.
In the Specify Template section, select Upload a template file.
Select Choose file, select your downloaded YAML file, then select Next.
The Specify stack page is displayed.Enter a name for your stack, then provide the following parameters:
AthenaDatabase: The name of the Athena database (from step 3, part 2e, also in the Athena Database field).
S3BucketResult: The bucket where Athena stores query results (that was created in step 3, part 2).
S3CURBucket: The bucket where the CUR is stored (from the preparation of the CUR, before the POC).
ZestyRoleName: Provide a meaningful name for the Athena role.
ZestyUserName: Provide a meaningful name for the Athena user.
On the Configure stack options page, select Next.
On the Review stack page, confirm all information, then select I acknowledge that AWS CloudFormation might create IAM resources with custom names.
Select Submit.
Step 5 - Install the Zesty Agent Helm chart
When the CUR, Athena, and IAM are configured, install the Zesty Agent using Helm.
During this step, you’ll grant read-only access to the services defined in the YAML so that Zesty can see your workload needs. (The only non-read-only permissions are for the Zesty qscaler.qubex.ai agent. This agent is only installed later, with your permission, if you want Zesty to manage your environment in the future.)
Add the Helm repository:
helm repo add zesty https://zesty-co.github.io/zesty-k8s-helm
The values.yaml file will be provided during the call.
The file contains these attributes:
athenaTable - The Athena table name (can be found in the Athena tab in the AWS console under your Athena Database)
athenaProjectID - <AWS account ID>
athenaBucketName - s3://[the name of the Athena query results]/
athenaRegion - Region where the source is located
athenaWorkgroup - The Athena Workgroup (can be found in the Athena tab in AWS console)
athenaCatalog - The Athena Data source (can be found in the Athena tab in AWS console)
athenaDatabase - The Athena AWS database (can be found in the Athena tab in AWS console)
Fill in the credentials:
If your cluster supports the external-secrets.io/v1beta1 CRD (kubectl get crd clusterexternalsecrets.external-secrets.io), it is recommended that you:
Put the encryptedCredentials in a secret and refer to it using the secret fields.
Remove the encryptedCredentials field from the file.
If your cluster does not support the above CRD, you will need to fill in the awsCluster.accessKeyID and awsCluster.secretAccessKey fields from the secret that was created by the CloudFormation Stack in step 2.
If necessary, you can see the secret in the AWS Secrets Manager.
If your cluster does not have metrics-server, you can enable the metricsServer.enabled boolean and the Helm chart will include a metrics-server along with the agent.
Check for a storage-class value (kubectl get storageclass). If there is no default, then add to values:
persistence:
spec:
storageClassName: "<name of existing storageclass>"
Step 6 - Install the Zesty K8s agent
Install the Agent and then verify the deployment.
Install the Agent by running the following command:
helm install zesty-k8s zesty/zesty-k8s-helm --namespace zesty-system --create-namespace -f values.yaml
Verify the deployment by running the following command:
kubectl get pods -n zesty-system
You should see one Pod running and then a second one.
Note: To have sufficient data for cost analysis and accurate recommendations, the Agent needs to run for 7-14 days after installation.