kubernetes-plugin

(★ 2,310)

Jenkins plugin to run dynamic agents in a Kubernetes/Docker environment

File Explorer

  • .dockerignore
  • .git-blame-ignore-revs
  • .gitignore
  • CHANGELOG-archive.md
  • CLAUDE.md
  • configuration.png
  • credentials.png
  • Dockerfile
  • Jenkinsfile
  • kind-preload.sh
  • kind.sh
  • LICENSE
  • pom.xml
  • README.md

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

docker build

View Details ▼

Build an image from a Dockerfile.

docker build .

Build a Docker image using the Dockerfile in the current directory:

docker build {{github.com/creack/docker-firefox}}

Build a Docker image from a Dockerfile at a specified URL:

docker build {{[-t|--tag]}} {{name:tag}} .

Build a Docker image and tag it:

🔍

docker run

View Details ▼

This command is an alias of `docker container run`.

tldr docker container run

View documentation for the original command:

🔍

gcloud container

View Details ▼

Manage containerized applications on Kubernetes and clusters.
See also: `gcloud`.

gcloud auth configure-docker

Register `gcloud` as a Docker credential helper:

gcloud container clusters create {{cluster_name}}

Create a cluster to run GKE containers:

gcloud container clusters list

List clusters for running GKE containers:

🔍

git

View Details ▼

Distributed version control system.
Some subcommands such as `commit`, `add`, `branch`, `switch`, `push`, etc. have their own usage documentation.

git init

Create an empty Git repository:

git clone {{https://example.com/repo.git}}

Clone a remote Git repository from the internet:

git status

View the status of the local repository:

🔍

kind

View Details ▼

Run local Kubernetes clusters using Docker container "nodes".
Designed for testing Kubernetes itself, but may be used for local development or continuous integration.

kind create cluster --name {{cluster_name}}

Create a local Kubernetes cluster:

kind delete clusters {{cluster_name}}

Delete one or more clusters:

kind get {{clusters|nodes|kubeconfig}}

Get details about clusters, nodes, or the kubeconfig:

🔍

kubectl config

View Details ▼

Manage Kubernetes configuration (kubeconfig) files for accessing clusters via `kubectl` or the Kubernetes API.
By default, the Kubernetes will get its configuration from `${HOME}/.kube/config`.
See also: `kubectx`, `kubens`.

kubectl config get-contexts

Get all contexts in the default kubeconfig file:

kubectl config {{get-clusters|get-contexts|get-users}} --kubeconfig {{path/to/kubeconfig.yaml}}

Get all clusters/contexts/users in a custom kubeconfig file:

kubectl config current-context

Get the current context:

🔍

kubectl create

View Details ▼

Create a resource from a file or from `stdin`.

kubectl create {{[-f|--filename]}} {{path/to/file.yml}}

Create a resource using the resource definition file:

kubectl create {{[-f|--filename]}} -

Create a resource from `stdin`:

kubectl create {{[deploy|deployment]}} {{deployment_name}} --image {{image}}

Create a deployment:

🔍

kubectl delete

View Details ▼

Delete Kubernetes resources.

kubectl delete {{[po|pods]}} {{pod_name}}

Delete a specific pod:

kubectl delete {{[deploy|deployments]}} {{deployment_name}}

Delete a specific deployment:

kubectl delete {{[no|nodes]}} {{node_name}}

Delete a specific node:

🔍

kubectl describe

View Details ▼

Show details of Kubernetes resources.

kubectl describe {{[po|pods]}} {{[-n|--namespace]}} {{namespace}}

Show details of pods in a namespace:

kubectl describe {{[no|nodes]}} {{[-n|--namespace]}} {{namespace}}

Show details of nodes in a namespace:

kubectl describe {{[po|pods]}} {{pod_name}} {{[-n|--namespace]}} {{namespace}}

Show the details of a specific pod in a namespace:

🔍

kubectl get

View Details ▼

Get Kubernetes objects and resources.

kubectl get {{[ns|namespaces]}}

Get all namespaces in the current cluster:

kubectl get {{[no|nodes]}} {{[-n|--namespace]}} {{namespace}}

Get nodes in a specified namespace:

kubectl get {{[po|pods]}} {{[-n|--namespace]}} {{namespace}}

Get pods in a specified namespace:

🔍

kubectl krew

View Details ▼

Plugin manager for `kubectl`.
See also: `kubectl-plugin`.

kubectl krew search

Search for available plugins:

kubectl krew install {{plugin_name}}

Install a plugin:

kubectl krew list

List installed plugins:

🔍

kubectl logs

View Details ▼

Show logs for containers in a pod.

kubectl logs {{pod_name}}

Show logs for a single-container pod:

kubectl logs {{[-c|--container]}} {{container_name}} {{pod_name}}

Show logs for a specified container in a pod:

kubectl logs --all-containers={{true}} {{pod_name}}

Show logs for all containers in a pod:

🔍

kubectl

View Details ▼

Run commands against Kubernetes clusters.
Some subcommands such as `run` have their own usage documentation.

kubectl get {{pods|service|deployment|ingress|...}} {{[-o|--output]}} wide

List information about a resource with more details:

kubectl label pods {{name}} unhealthy=true

Update specified pod with the label `unhealthy` and the value `true`:

kubectl get all

List all resources with different types:

🔍

minikube start

View Details ▼

Start `minikube` with different configurations.

minikube start --kubernetes-version {{v1.24.0}}

Start `minikube` with a specific Kubernetes version:

minikube start --memory {{2048}} --cpus {{2}}

Start `minikube` with specific resource allocations (e.g., memory and CPU):

minikube start --driver {{virtualbox}}

Start `minikube` with a specific driver (e.g., VirtualBox):

🔍

minikube

View Details ▼

Run Kubernetes locally.

minikube start

Start the cluster:

minikube ip

Get the IP address of the cluster:

minikube service {{my_service}} --url

Access a service named `my_service` exposed via a node port and get the URL:

🔍

mvn

View Details ▼

Apache Maven: build and manage Java-based projects.

mvn compile

Compile a project:

mvn package

Compile and package the compiled code in its distributable format, such as a `jar`:

mvn package {{[-D|--define]}} skipTests

Compile and package, skipping unit tests:

🔍

node

View Details ▼

Server-side JavaScript platform (Node.js).

node {{path/to/file}}

Run a JavaScript file:

node

Start a REPL (interactive shell):

node --watch {{path/to/file}}

Execute the specified file restarting the process when an imported file is changed (requires Node.js version 18.11+):

🔍

openssl

View Details ▼

OpenSSL cryptographic toolkit.
Some subcommands such as `req` have their own usage documentation.

openssl genpkey -algorithm {{rsa|ec}} -out {{path/to/private.key}} -aes256

Generate a private key and encrypt the output file using AES-256:

openssl rsa -in {{path/to/private.key}} -pubout -out {{path/to/public.key}}

Generate the corresponding public key from the private key `private.key` using `rsa`:

openssl req -new -x509 -key {{path/to/private.key}} -out {{path/to/certificate.crt}} -days 365

Generate a self-signed certificate valid for a specified number of days (365):

🔍

container

View Details ▼

Create and run Linux containers as lightweight virtual machines on macOS.

container system start

Start the container services (required before running containers):

container run --rm {{[-it|--interactive --tty]}} {{image}} {{sh}}

Run a container from an image interactively and remove it after it exits:

container run {{[-d|--detach]}} --name {{container_name}} {{[-p|--publish]}} {{8080:80}} {{image}}

Run a container in the background with a name and a published port:

// repository documentation