jenkins-agent-k8s docs: Quick guide

Quick guide

What you’ll do

Through the process, you’ll inspect the Kubernetes resources created and verify the workload state.

Requirements

  • Juju 3 installed.
  • Juju controller and model created.

For more information about how to install Juju, see Get started with Juju.

Deploy the Jenkins agent k8s charm

Since the Jenkins agent k8s charm requires a connection to Jenkins, you’ll deploy the Jenkins charm too. For more information, see Charm Architecture.

Deploy the charms:

juju deploy jenkins-agent-k8s
juju deploy jenkins-k8s

To see the pod created by the Jenkins agent k8s charm, run kubectl get pods on a namespace named for the Juju model you’ve deployed the charm into. The output is similar to the following:

NAME                             READY   STATUS            RESTARTS   AGE
jenkins-agent-k8s-0              2/2     Running           0          2m2s

Run juju status to see the current status of the deployment. In the Unit list, you can see that Jenkins agent k8s is waiting:

jenkins-agent-k8s/0*  blocked   idle   10.1.180.75         Waiting for config/relation.

This means that Jenkins k8s agent charm isn’t integrated with Jenkins yet.

Integrate with the Jenkins charm

Provide integration between Jenkins agent k8s and Jenkins by running the following juju integrate command:

juju integrate jenkins-k8s jenkins-agent-k8s

Run juju status and wait until the Application status is Active as the following example:

Optional: run juju status --relations --watch 5s to watch the status every 5 seconds with the Relations section.

App                Version  Status   Scale  Charm              Channel  Rev  Address         Exposed  Message
jenkins-agent-k8s           active       1  jenkins-agent-k8s  stable    18  10.152.183.135  no       

The deployment finishes when the status shows “Active”.