Skip to content

Commit

Permalink
fix: proper example names
Browse files Browse the repository at this point in the history
  • Loading branch information
pkoutsovasilis committed Oct 31, 2024
1 parent bdb81d0 commit 19ae4ec
Show file tree
Hide file tree
Showing 6 changed files with 1,302 additions and 1,302 deletions.
31 changes: 19 additions & 12 deletions deploy/helm/elastic-agent/examples/user-cluster-role/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Example: Kubernetes Integration with User-created service account
# Example: Kubernetes Integration with User-created cluster role

In this example we install the built-in `kubernetes` integration with the default built-in values, including the use of a user-created service account.
In this example we define a `nginx` custom integration alongside a custom agent preset defined in [agent-nginx-values.yaml](agent-nginx-values.yaml) including the use of a user-created cluster role. Note that the user is responsible for assigning the correct permissions to the cluster role.

## Prerequisites:
1. A k8s secret that contains the connection details to an Elasticsearch cluster such as the URL and the API key ([Kibana - Creating API Keys](https://www.elastic.co/guide/en/kibana/current/api-keys.html)):
Expand All @@ -10,21 +10,28 @@ In this example we install the built-in `kubernetes` integration with the defaul
--from-literal=url=...
```

2. `kubernetes` integration assets installed through Kibana ([Kibana - Install and uninstall Elastic Agent integration assets](https://www.elastic.co/guide/en/fleet/current/install-uninstall-integration-assets.html))
2. `nginx` integration assets are installed through Kibana

3. Create a cluster role.

3. A k8s service account
```console
kubectl create serviceaccount user-sa
kubectl create clusterrole user-cr --verb=get,list,watch --resource=pods,namespaces,nodes,replicasets,jobs
```

## Run:
```console
helm install elastic-agent ../../ \
-f ./agent-kubernetes-values.yaml \
--set outputs.default.type=ESSecretAuthAPI \
--set outputs.default.secretName=es-api-secret
```
1. Install Helm chart
```console
helm install elastic-agent ../../ \
-f ./agent-nginx-values.yaml \
--set outputs.default.type=ESSecretAuthAPI \
--set outputs.default.secretName=es-api-secret
```

2. Install the nginx deployment
```console
kubectl apply -f ./nginx.yaml
```

## Validate:

1. The Kibana `kubernetes`-related dashboards should start showing up the respective info.
1. The Kibana `nginx`-related dashboards should start showing nginx related data.
Loading

0 comments on commit 19ae4ec

Please sign in to comment.