Skip to content

Commit

Permalink
feat(k8s): moved content to new doc
Browse files Browse the repository at this point in the history
  • Loading branch information
x8a committed Jun 22, 2022
1 parent 7975985 commit 83f49c3
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 108 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
---
title: Data governance
tags:
- Integrations
- Kubernetes integration
- Configuration
metaDescription: How to manage your data of the Kubernetes integration.
---

### Change the scrape interval [#scrape-interval]

The Kubernetes Integration v3 and above allows changing the interval at which metrics are gathered from the cluster. This allows choosing a tradeoff between data resolution and usage. We recommend choosing an interval between 15 and 30 seconds for optimal experience.

In order to change the scrape interval, add the following to your `values-newrelic.yaml`, under the `newrelic-infratructure` section:

```yaml
common:
config:
interval: 25s
```

So it ends up looking like:

```yaml
global:
licenseKey: _YOUR_NEW_RELIC_LICENSE_KEY_
cluster: _K8S_CLUSTER_NAME_

# ... Other settings as shown above

# Configuration for newrelic-infrastructure
newrelic-infrastructure:
# ... Other settings as shown above
common:
config:
interval: 25s
```

<Callout variant="important">
Setting `interval` to values larger than `40s` is not allowed.
</Callout>

### Filtering Namespaces [#filter-namespace]

The Kubernetes Integration v3 and above allows filtering which namespaces are scraped by labelling them. By default all namespaces are scraped.

We use the `namespaceSelector` in the same way kubernetes does. In order to include only namespaces matching a label, change the `namespaceSelector` by adding the following to your `values-newrelic.yaml`, under the `newrelic-infratructure` section:

```yaml
common:
config:
namespaceSelector:
matchLabels:
key1 : "value1"
```

In this example only namespaces with the label `newrelic.com/scrape` set to `true` will be scraped:

```yaml
global:
licenseKey: _YOUR_NEW_RELIC_LICENSE_KEY_
cluster: _K8S_CLUSTER_NAME_

# ... Other settings as shown above

# Configuration for newrelic-infrastructure
newrelic-infrastructure:
# ... Other settings as shown above
common:
config:
namespaceSelector:
matchLabels:
newrelic.com/scrape: "true"
```

You can also use kubernetes expressions to include or exclude namespaces using the following syntax:

```yaml
common:
config:
namespaceSelector:
matchExpressions:
- {key: newrelic.com/scrape, operator: NotIn, values: ["false"]}
- {key: key1, operator: In, values: ["value1"]}
```

<Callout variant="tip">
The expressions under `matchExpressions` are concatenated.
</Callout>

In this example namespaces with the label `newrelic.com/scrape` set to `false` will be excluded:

```yaml
global:
licenseKey: _YOUR_NEW_RELIC_LICENSE_KEY_
cluster: _K8S_CLUSTER_NAME_

# ... Other settings as shown above

# Configuration for newrelic-infrastructure
newrelic-infrastructure:
# ... Other settings as shown above
common:
config:
namespaceSelector:
matchExpressions:
- {key: newrelic.com/scrape, operator: NotIn, values: ["false"]}
```

See a full list of the settings that can be modified in the [chart's README file](https://github.com/newrelic/nri-kubernetes/tree/main/charts/newrelic-infrastructure).
Original file line number Diff line number Diff line change
Expand Up @@ -275,108 +275,6 @@ The full list of flags that can be tweaked can be found in our chart's repositor
Remember that when specifying options for these charts, you must put them under the chart name in your `values-newrelic.yaml`.
</Callout>

### Change the scrape interval [#scrape-interval]

The Kubernetes Integration v3 and above allows changing the interval at which metrics are gathered from the cluster. This allows choosing a tradeoff between data resolution and usage. We recommend choosing an interval between 15 and 30 seconds for optimal experience.

In order to change the scrape interval, add the following to your `values-newrelic.yaml`, under the `newrelic-infratructure` section:

```yaml
common:
config:
interval: 25s
```

So it ends up looking like:

```yaml
global:
licenseKey: _YOUR_NEW_RELIC_LICENSE_KEY_
cluster: _K8S_CLUSTER_NAME_

# ... Other settings as shown above

# Configuration for newrelic-infrastructure
newrelic-infrastructure:
# ... Other settings as shown above
common:
config:
interval: 25s
```

<Callout variant="important">
Setting `interval` to values larger than `40s` is not allowed.
</Callout>

### Filtering Namespaces [#filter-namespace]

The Kubernetes Integration v3 and above allows filtering which namespaces are scraped by labelling them. By default all namespaces are scraped.

We use the `namespaceSelector` in the same way kubernetes does. In order to include only namespaces matching a label, change the `namespaceSelector` by adding the following to your `values-newrelic.yaml`, under the `newrelic-infratructure` section:

```yaml
common:
config:
namespaceSelector:
matchLabels:
key1 : "value1"
```

In this example only namespaces with the label `newrelic.com/scrape` set to `true` will be scraped:

```yaml
global:
licenseKey: _YOUR_NEW_RELIC_LICENSE_KEY_
cluster: _K8S_CLUSTER_NAME_

# ... Other settings as shown above

# Configuration for newrelic-infrastructure
newrelic-infrastructure:
# ... Other settings as shown above
common:
config:
namespaceSelector:
matchLabels:
newrelic.com/scrape: "true"
```

You can also use kubernetes expressions to include or exclude namespaces using the following syntax:

```yaml
common:
config:
namespaceSelector:
matchExpressions:
- {key: newrelic.com/scrape, operator: NotIn, values: ["false"]}
- {key: key1, operator: In, values: ["value1"]}
```

<Callout variant="tip">
The expressions under `matchExpressions` are concatenated.
</Callout>

In this example namespaces with the label `newrelic.com/scrape` set to `false` will be excluded:

```yaml
global:
licenseKey: _YOUR_NEW_RELIC_LICENSE_KEY_
cluster: _K8S_CLUSTER_NAME_

# ... Other settings as shown above

# Configuration for newrelic-infrastructure
newrelic-infrastructure:
# ... Other settings as shown above
common:
config:
namespaceSelector:
matchExpressions:
- {key: newrelic.com/scrape, operator: NotIn, values: ["false"]}
```

See a full list of the settings that can be modified in the [chart's README file](https://github.com/newrelic/nri-kubernetes/tree/main/charts/newrelic-infrastructure).

## Upgrade using Helm [#upgrade]

To update your Kubernetes integration installed via Helm:
Expand Down
14 changes: 8 additions & 6 deletions src/nav/kubernetes-pixie.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ pages:
path: /docs/logs/forward-logs/kubernetes-plugin-log-forwarding
- title: Advanced configuration
pages:
- title: Configure control plane monitoring
path: /docs/kubernetes-pixie/kubernetes-integration/advanced-configuration/configure-control-plane-monitoring
- title: Configure Kubernetes with a proxy
path: /docs/kubernetes-pixie/kubernetes-integration/advanced-configuration/configure-kubernetes-proxy
- title: Data governance
path: /docs/kubernetes-pixie/kubernetes-integration/advanced-configuration/data-governance
- title: Set alerts on Kubernetes
pages:
- title: Predefined alert policy
Expand All @@ -43,18 +49,14 @@ pages:
path: /docs/kubernetes-pixie/kubernetes-integration/advanced-configuration/link-apm-applications-kubernetes
- title: Link OTel-instrumented apps to Kubernetes
path: /docs/kubernetes-pixie/kubernetes-integration/advanced-configuration/link-otel-applications-kubernetes
- title: Configure control plane monitoring
path: /docs/kubernetes-pixie/kubernetes-integration/advanced-configuration/configure-control-plane-monitoring
- title: Configure Kubernetes with a proxy
path: /docs/kubernetes-pixie/kubernetes-integration/advanced-configuration/configure-kubernetes-proxy
- title: New Relic Metrics Adapter
path: /docs/kubernetes-pixie/kubernetes-integration/advanced-configuration/newrelic-metrics-adapter
- title: Monitor services on Kubernetes
pages:
- title: Monitor services on Kubernetes
path: /docs/kubernetes-pixie/kubernetes-integration/advanced-configuration/monitor-services/monitor-services-running-kubernetes
- title: 'Tutorial: Monitor services on Kubernetes with Redis'
path: /docs/kubernetes-pixie/kubernetes-integration/advanced-configuration/monitor-services/tutorial-monitor-redis-running-kubernetes
- title: New Relic Metrics Adapter
path: /docs/kubernetes-pixie/kubernetes-integration/advanced-configuration/newrelic-metrics-adapter
- title: Troubleshooting
pages:
- title: Not seeing data
Expand Down

0 comments on commit 83f49c3

Please sign in to comment.