# Kubernetes with Fluentd (without Helm)

Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fintegrations%2Fkubernetes%2Fkubernetes-with-fluentd-without-helm.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fintegrations%2Fkubernetes%2Fkubernetes-with-fluentd-without-helm.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

Fluentd is a versatile data shipper with numerous available plugins and functionalities, playing a pivotal role as a logs shipper to our platform. Below are instructions on how to set up the Fluentd shipper along with the http output plugin to transmit logs to the Coralogix platform.

## [](https://github.com/coralogix/fluentd-coralogix-image/blob/master/examples/kubernetes/README.rst#prerequisites)Prerequisites[​](#prerequisites "Direct link to prerequisites")

Before you begin, make sure you have:

* Enabled RBAC authorization mode in your Kubernetes Cluster

* Your Coralogix [Send-Your-Data API key](https://docs-docusaurus.kinsta.page/user-guides/account-management/api-keys/send-your-data-api-key/.md)

## Installation[​](#installation "Direct link to Installation")

To specify essential environment variables, create a configmap as shown below:

```
---

## fluentd-env-cm.yaml:

apiVersion: v1

kind: ConfigMap

metadata:

  labels:

    app.kubernetes.io/name: fluentd

    app.kubernetes.io/instance: fluentd-http

  name: fluentd-env

data:

  ENDPOINT: ingress.eu2.coralogix.com

  LOG_LEVEL: error
```

**Notes**:

* The configmap name is crucial and utilized by the daemonSet.

* Ensure to change 'ENDPOINT' according to your logs endpoint from the table provided.

Apply the configmap:

```
kubectl apply -f fluentd-env-cm.yaml -n monitoring
```

Next, apply the manifest files in this directory:

```
kubectl apply -f https://raw.githubusercontent.com/coralogix/telemetry-shippers/master/logs/fluentd/k8s-manifest/fluentd-cm.yaml -n monitoring

kubectl apply -f https://raw.githubusercontent.com/coralogix/telemetry-shippers/master/logs/fluentd/k8s-manifest/fluentd-rbac.yaml -n monitoring

kubectl apply -f https://raw.githubusercontent.com/coralogix/telemetry-shippers/master/logs/fluentd/k8s-manifest/fluentd-svc.yaml -n monitoring

kubectl apply -f https://raw.githubusercontent.com/coralogix/telemetry-shippers/master/logs/fluentd/k8s-manifest/fluentd-ds.yaml -n monitoring
```

You should see the following output:

```
configmap/fluentd-prometheus-conf created

configmap/fluentd-systemd-conf created

configmap/fluentd-config created

configmap/fluentd-main created

daemonset.apps/fluentd-http created

serviceaccount/fluentd-http created

clusterrole.rbac.authorization.k8s.io/fluentd-http created

clusterrolebinding.rbac.authorization.k8s.io/fluentd-http created

servicemonitor.monitoring.coreos.com/fluentd-http created

service/fluentd-http created
```

If you have the prometheus-operator installed, you can install this service monitor resource:

```
kubectl apply -f https://raw.githubusercontent.com/coralogix/telemetry-shippers/master/logs/fluentd/k8s-manifest/fluentd-svc-monitor.yaml -n monitoring
```

### Modifying applicationName and subsystemName[​](#modifying-applicationname-and-subsystemname "Direct link to Modifying applicationName and subsystemName")

By default, we utilize the field `kubernetes.namespace_name` as the applicationName and `kubernetes.container_name` as the subsystemName.

#### Dynamic[​](#dynamic "Direct link to Dynamic")

To modify these values and use another field as the value of applicationName and subsystemName, modify the `fluentd-config` configmap and specifically the `coralogix.conf` key.

#### Static[​](#static "Direct link to Static")

To modify these values and use a hard-coded value as the value of applicationName and subsystemName, modify the `fluentd-config` configmap and specifically the `coralogix.conf` key.

### Removal[​](#removal "Direct link to Removal")

To remove all resources created with manifest files, use these commands:

```
kubectl delete -f https://raw.githubusercontent.com/coralogix/telemetry-shippers/master/logs/fluentd/k8s-manifest/fluentd-cm.yaml -n monitoring

kubectl delete -f https://raw.githubusercontent.com/coralogix/telemetry-shippers/master/logs/fluentd/k8s-manifest/fluentd-rbac.yaml -n monitoring

kubectl delete -f https://raw.githubusercontent.com/coralogix/telemetry-shippers/master/logs/fluentd/k8s-manifest/fluentd-svc.yaml -n monitoring

kubectl delete -f https://raw.githubusercontent.com/coralogix/telemetry-shippers/master/logs/fluentd/k8s-manifest/fluentd-ds.yaml -n monitoring

kubectl delete -f fluentd-env-cm.yaml -n monitoring
```

The output should be:

```
configmap "fluentd-prometheus-conf" deleted

configmap "fluentd-systemd-conf" deleted

configmap "fluentd-config" deleted

configmap "fluentd-main" deleted

daemonset.apps "fluentd-http" deleted

serviceaccount "fluentd-http" deleted

clusterrole.rbac.authorization.k8s.io "fluentd-http" deleted

clusterrolebinding.rbac.authorization.k8s.io "fluentd-http" deleted

servicemonitor.monitoring.coreos.com "fluentd-http" deleted

service "fluentd-http" deleted

configmap "fluentd-env" deleted
```

### Coralogix endpoints[​](#coralogix-endpoints "Direct link to Coralogix endpoints")

Choose the <!-- -->https\://ingress. endpoint that corresponds to your Coralogix [domain](https://docs-docusaurus.kinsta.page/user-guides/account-management/account-settings/coralogix-domain/.md) using the domain selector at the top of the page.

### Deploy to a different namespace[​](#deploy-to-a-different-namespace "Direct link to Deploy to a different namespace")

If you need to deploy the Fluentd integration to a namespace other than "monitoring", change the fluentd-rbac.yaml file ClusterRoleBinding namespace accordingly.

### Disable Systemd Logs[​](#disable-systemd-logs "Direct link to Disable Systemd Logs")

To disable the systemd logs, remove the `fluentd-systemd-conf` configmap:

```
kubectl delete cm fluentd-systemd-conf  
```

### Dashboard[​](#dashboard "Direct link to Dashboard")

Under the `dashboard` directory, you'll find a Fluentd Grafana dashboard provided by Coralogix. To import the dashboard into Grafana, copy the JSON file content, navigate to Grafana, click on the `Create` tab, then `import`, and paste the copied JSON file.

### Coralogix Fluentd Buffer Alert[​](#coralogix-fluentd-buffer-alert "Direct link to Coralogix Fluentd Buffer Alert")

To create an alert on Fluentd buffer in Coralogix, refer to the [coralogix-alert doc](https://github.com/coralogix/telemetry-shippers/blob/master/logs/fluentd/docs/coralogix-alerts.md).

## Additional resources[​](#additional-resources "Direct link to Additional resources")

|                        |                                                                                                 |
| ---------------------- | ----------------------------------------------------------------------------------------------- |
| External Documentation | [GitHub repository](https://github.com/coralogix/telemetry-shippers/tree/master)                |
| Coralogix Endpoints    | [Coralogix Endpoints](https://docs-docusaurus.kinsta.page/integrations/coralogix-endpoints/.md) |
