This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Custom image

Run custom container image in Kubernetes cluster.

1 - Introduction

Custom image plugin introduction

The custom-image plugins enables the deployment of a custom image to be executed as Task. This is extremely useful to run custom logic and software in the resiliency patterns.

The Pod is deployed in the Kubernetes namespace where the Task has been created.

2 - Configuration

Plugin parameters and accepted values

Task

Configuration

NameDescriptionTypeRequired
imageContainer image to be deployedstringyes
commandThe command to be executed when the container starts[]stringyes

3 - Samples

Kubernetes to Kubernetes plugin Architecture

This is a list of samples of what can be perfomed as Task with the custom-image plugin.

Bash command

Run a bash command:

apiVersion: automation.astronetes.io/v1alpha1
kind: Task
metadata:
  name: hello-world
spec:
  plugin: custom-image
  config:
    image: busybox
    command:
      - echo
      - "hello world"

Kubectl command

Execute a kubectl command:

apiVersion: automation.astronetes.io/v1alpha1
kind: Task
metadata:
  name: kubectl
spec:
  plugin: custom-image
  config:
    image: bitnami/kubectl:1.27
    command:
      - kubectl
      - cluster-info
    clusterRole: cluster-admin