---
title: Charmhub | Deploy Jenkins K8s using Charmhub - The Open Operator Collection
description: Deploy the latest version of Jenkins K8s as a Kubernetes Operator on
  any cloud.
url: https://charmhub.io/jenkins-k8s/docs/reference-integrations
---

# Jenkins K8s

[Canonical IS DevOps](https://charmhub.io/publisher/canonical-is-devops "View all packages from Canonical IS DevOps")

* [Canonical IS DevOps](https://charmhub.io/publisher/canonical-is-devops "View all packages from Canonical IS DevOps")

Platform:

stable 201

```
juju deploy jenkins-k8s
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

---

#### Contacts

* [Submit a bug](https://github.com/canonical/jenkins-k8s-operator/issues)

---

Share your thoughts on this charm with the community on discourse.

[Join the discussion](https://discourse.charmhub.io/)

# Integrations

### [`agent`](https://charmhub.io/jenkins-k8s/docs/reference-integrations#p-26785-agent)

*Interface*: jenkins\_agent\_v0
*Supported charms*: [jenkins-agent-k8s](https://charmhub.io/jenkins-agent-k8s),
[jenkins-agent](https://charmhub.io/jenkins-agent)

Jenkins agents provide a way to perform tasks scheduled by the Jenkins server. Jenkins agents are
used to distribute workload across multiple containers, allowing parallel execution of jobs.

Example agent integrate command:

```
juju relate jenkins-k8s:agent jenkins-agent-k8s:agent
```

To create a [cross model relation](https://documentation.ubuntu.com/juju/3.6/howto/manage-relations/#add-a-cross-model-relation) with
a jenkins-agent (VM) charm, create an offer from the machine model.

```
juju offer jenkins-agent:agent
```

Then, relate the offer from the k8s model where jenkins-k8s charm resides.

```
juju integrate jenkins-k8s:agent <controller-name>:<juju-user>/<agent-model>.jenkins-agent
```

An example of such command would look like the following, using a jenkins-agent deployed on a
localhost
[LXD controller](https://documentation.ubuntu.com/juju/3.6/tutorial/#prepare-your-cloud).

```
juju integrate jenkins-k8s:agent localhost:admin/jenkins-vm-model.jenkins-agent
```

### [`logging`](https://charmhub.io/jenkins-k8s/docs/reference-integrations#p-26785-logging)

*Interface*: loki\_push\_api
*Supported charms*: [loki-k8s](https://charmhub.io/loki-k8s)

Logging relation provides a way to scrape logs produced from the Jenkins server charm. The Jenkins
server logs are stored at `/var/lib/jenkins/logs/jenkins.log`. These logs are the same logs as the logs
emitted to the standard output. A promtail worker is spawned and will periodically push logs to
Loki.

Example agent integrate command:

```
juju integrate jenkins-k8s:logging loki-k8s:logging
```

### [`metrics-endpoint`](https://charmhub.io/jenkins-k8s/docs/reference-integrations#p-26785-metrics-endpoint)

*Interface*: prometheus\_scrape
*Supported charms*: [prometheus-k8s](https://charmhub.io/prometheus-k8s)

Metrics-endpoint relation allows scraping the `/prometheus` endpoint provided by Jenkins
`prometheus` plugin on port 8080. The `/metrics` endpoint is reserved for `metrics` plugin, which
is a dependency of `prometheus` plugin. The metrics are exposed in the open metrics format and will
only be scraped by Prometheus once the relation becomes active. For more information about the
metrics exposed, please refer to the
[`prometheus` plugin documentation](https://plugins.jenkins.io/prometheus/).

Example metrics-endpoint integrate command:

```
juju integrate jenkins-k8s:metrics-endpoint prometheus-k8s:metrics-endpoint
```

### [`grafana-dashboard`](https://charmhub.io/jenkins-k8s/docs/reference-integrations#p-26785-grafana-dashboard)

*Interface*: grafana\_dashboard
*Supported charms*: [grafana-k8s](https://charmhub.io/grafana-k8s)

Grafana-dashboard relation enables quick dashboard access already tailored to fit the needs of
operators to monitor the charm. The template for the Grafana dashboard for jenkins-k8s charm can be
found at `/src/grafana_dashboards/jenkins.json`. In Grafana UI, it can be found as “Jenkins:
Performance and Health Overview” under the General section of the dashboard browser
(`/dashboards`). Modifications to the dashboard can be made but will not be persisted upon
restart/redeployment of the charm.

Grafana-Prometheus integrate command:

```
juju integrate grafana-k8s:grafana-source prometheus-k8s:grafana-source
```

Grafana-dashboard integrate command:

```
juju integrate jenkins-k8s:grafana-dashboard grafana-k8s:grafana-dashboard
```

---
