Info |
---|
This article instructs on explains how to create a DaemonSet in order to install and run one sample of Cloudaware Breeze agent on every node of a cloud-managed Kubernetes cluster (Amazon EKS, Azure AKS, Google GKE). This allows to get the agent data from the cluster in Cloudaware CMDB. |
...
Linux only. |
Table of Contents |
---|
Prerequisites
Amazon EKS: ensure that Cloudaware has required permissions using this guide.
Azure AKS: ensure that Cloudaware has required permissions using this guide.
Description
DaemonSet starts the container with Breeze agent installer. The container has two bind mounts:
host:/opt > container:/opt
- used used for the Breeze agent installation from container to the host file systemhost:/ > container:/var/root
- used used for launching the agent in the chroot environment
The container runs two commands:
Install the Breeze agent to the
/opt
directory.Run the simple daemon which runs the Breeze agent every 15 minutes.
Steps
1. Open Cloudaware GitHub repo with Kubernetes files. Clone the repo to your Github using the following command:
Code Block |
---|
git clone |
...
download breeze installer from ca org
...
https://github.com/cloudaware/breeze-tools.git |
2. Log in to Cloudaware account → Admin.
...
3. Find Breeze in the list of DevOps Integrations. Click 1 Configured.
...
4. Select the file for Linux*:
...
*This integration is for Linux only.
5. Untar the Breeze installer and copy the extracted files (./breeze-agent folder)
...
into kubernetes/daemonset folder of the cloned
...
repo:
Code Block |
---|
cd |
...
breeze-tools/kubernetes/daemonset && tar xzvf <DOWNLOADS_PATH>/breeze-agent.example.version.0.x86_64.linux.tgz |
WHERE
breeze-agent.example.version.0.x86_64.linux.tgz
should be replaced by the name of the dowloaded installer file (e.g. breeze-agent.1x11xx1xxxx11x11111x1x1x.11111111.0.x86_64.linux.tgz).
Code Block |
---|
docker build -t ca-breeze-ds . |
...
You need to upload the result image to your private container registry
6. Create a repository in your private container registry (e.g. AWS ECR, Azure ACR, Google GCR, etc.) named ca-breeze-ds. Upload the result image to your private container registry.
Code Block |
---|
docker tag ca-breeze-ds:latest <CONTAINER_REGISTRY_HOSTNAME>/ca-breeze-ds:latest |
Code Block |
---|
docker push <CONTAINER_REGISTRY_HOSTNAME>/ca-breeze-ds:latest |
6. Edit the DaemonSet configuration file ds-breeze-agent.yaml
, replace placeholders (make sure image pull secret is added to kubernetes secrets)
7. kubectl create -f ds-breeze-agent.yaml
8. to verify that the daemonset has been created you may run the following command:
kubectl get ds
9. data in CA
Create Docker Image
1. Download the Breeze agent installer and unpack it to the current directory:
Code Block |
---|
wget breeze-agent.example.version.0.x86_64.linux.tgz
tar xvzf breeze-agent.example.version.0.x86_64.linux.tgz |
2. Build the Docker image:
Code Block |
---|
docker build -t IMAGE_NAME . |
3. Push the image to your private Docker container registry:
Code Block |
---|
docker tag IMAGE_NAME:latest DOCKER_SERVER_HOSTNAME/IMAGE_NAME:latest
docker push IMAGE_NAME:latest DOCKER_SERVER_HOSTNAME/IMAGE_NAME:latest |
Run DaemonSet
1WHERE
<CONTAINER_REGISTRY_HOSTNAME>
is a placeholder that needs to be replaced by your private container registry URI (e.g. 111111111111.dkr.ecr.us-east-1.amazonaws.com/breeze-agent).
7. Edit the DaemonSet configuration file ds-breeze-agent.yaml
and replace replacing the following placeholders with valid values:
DOCKER_SERVER_HOSTNAME
IMAGE_NAME
DOCKER_SERVER_SECRETS
2. Ensure that image pull secret is added to Kubernetes Secrets.
8. Create the new DaemonSet using the following command:
Code Block |
---|
kubectl create -f ds-breeze-agent.yaml |
9. To verify that the DaemonSet has been created, run the command:
Code Block |
---|
kubectl get ds |