Amazon EKS Integration¶
Amazon Elastic Kubernetes Services (Amazon EKS) is a managed container service to run and scale Kubernetes applications in the AWS cloud. For running and extending Kubernetes applications in the AWS cloud. DataKit provides observations for the Amazon EKS Cluster in different dimensions by namespace, cluster, Pod.Customers can use their existing AWS support agreements to obtain support.
Architecture overview¶
Using Amazon EKS add-on¶
Deploying Datakit on an Amazon EKS cluster using Amazon EKS add-on.
Prerequisites¶
- Subscribe on the AWS Marketplace Guance Container Agent 。
- You have access to an Amazon EKS Cluster .
- You need to get it in advance
DK_DATAWAY
. You can also obtain it by following the instructions below:- You can go to Guance official website, register now as a Guance user.
- Click the 「Integration」 menu, then select the 「DataKit」 TAB and copy the
DK_DATAWAY
parameter
- Search Add-ons First, in the Amazon EKS Console, go to your EKS cluster and select "Get more Add-ons" on the "add-ons" TAB to find the new third-party EKS add-ons in the cluster Settings of the existing EKS cluster. And search for 'datakit', select 'Guance Container Agent', next step.
- Confirm installation Select the latest version to install.
configuration DataKit¶
Set the token
environment variable:
Add token to env-dataway
secrets:
envDataway=$(echo -n "$token" | base64)
kubectl patch secret env-dataway -p "{\"data\": {\"datawayUrl\": \"$envDataway\"}}" -n datakit
restart DataKit:
Verify Deployment¶
- Get deployment status
Expected output:
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
datakit dataki 1 2024-01-12 14:50:07.880846 +0800 CST deployed datakit-1.20.0 1.20.0
- Guance Cloud verify
Deploying DataKit on an Amazon EKS Cluster using Helm¶
Prerequisites¶
- Install the following tools: Helm 3.7.1, kubectl, and AWS CLI .
- You have access to an Amazon EKS Cluster .
- You need to get it in advance
DK_DATAWAY
. You can also obtain it by following the instructions below:- You can go to Guance official website, register now as a Guance user.
- Click the 「Integration」 menu, then select the 「DataKit」 TAB and copy the
DK_DATAWAY
parameter
Login to the ECR Registry¶
export HELM_EXPERIMENTAL_OCI=1
aws ecr get-login-password \
--region us-east-1 | helm registry login \
--username AWS \
--password-stdin 709825985650.dkr.ecr.us-east-1.amazonaws.com
Helm installation (Upgrade) DataKit¶
Attention
- Helm Version must be 3.7.1.
datakit.datawayUrl
Must be modified.
helm upgrade -i datakit oci://709825985650.dkr.ecr.us-east-1.amazonaws.com/guance/datakit-charts --version 1.23.5 \
--create-namespace -n datakit
Expected output:
Release "datakit" does not exist. Installing it now.
Warning: chart media type application/tar+gzip is deprecated
Pulled: 709825985650.dkr.ecr.us-east-1.amazonaws.com/guance/datakit-charts:1.23.5
Digest: sha256:04ce9e0419d8f19898a5a18cda6c35f0ff82cf63e0d95c8693ef0a37ce9d8348
NAME: datakit
LAST DEPLOYED: Fri Jan 12 14:50:07 2024
NAMESPACE: datakit
STATUS: deployed
REVISION: 1
NOTES:
1. Get the application URL by running these commands:
export POD_NAME=$(kubectl get pods --namespace datakit -l "app.kubernetes.io/name=datakit,app.kubernetes.io/instance=datakit" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace datakit $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:9527 to use your application"
kubectl --namespace datakit port-forward $POD_NAME 9527:$CONTAINER_PORT
configuration DataKit¶
Set the token
environment variable:
Add token to env-dataway
secrets:
envDataway=$(echo -n "$token" | base64)
kubectl patch secret env-dataway -p "{\"data\": {\"datawayUrl\": \"$envDataway\"}}" -n datakit
restart DataKit:
Verify Deployment¶
- Get deployment status
Expected output:
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
datakit dataki 1 2024-01-12 14:50:07.880846 +0800 CST deployed datakit-1.20.0 1.20.0
- Guance Cloud verify