A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://book.kubebuilder.io/plugins/available/deploy-image-plugin-v1-alpha below:

image/v1-alpha - The Kubebuilder Book

Deploy Image Plugin (deploy-image/v1-alpha)

The deploy-image plugin allows users to create controllers and custom resources that deploy and manage container images on the cluster, following Kubernetes best practices. It simplifies the complexities of deploying images while allowing users to customize their projects as needed.

By using this plugin, you will get:

Examples

See the project-v4-with-plugins directory under the testdata directory in the Kubebuilder project to check an example of scaffolding created using this plugin.

The Memcached API and its controller was scaffolded using the command:

kubebuilder create api \
  --group example.com \
  --version v1alpha1 \
  --kind Memcached \
  --image=memcached:memcached:1.6.26-alpine3.19 \
  --image-container-command="memcached,--memory-limit=64,-o,modern,-v" \
  --image-container-port="11211" \
  --run-as-user="1001" \
  --plugins="deploy-image/v1-alpha"

The Busybox API was created with:

kubebuilder create api \
  --group example.com \
  --version v1alpha1 \
  --kind Busybox \
  --image=busybox:1.36.1 \
  --plugins="deploy-image/v1-alpha"
When to use it? How to use it?
  1. Initialize your project: After creating a new project with kubebuilder init, you can use this plugin to create APIs. Ensure that you’ve completed the quick start guide before proceeding.

  2. Create APIs: With this plugin, you can create APIs to specify the image (Operand) you want to deploy on the cluster. You can also optionally specify the command, port, and security context using various flags:

    Example command:

    kubebuilder create api --group example.com --version v1alpha1 --kind Memcached --image=memcached:1.6.15-alpine --image-container-command="memcached,--memory-limit=64,modern,-v" --image-container-port="11211" --run-as-user="1001" --plugins="deploy-image/v1-alpha"
    
Note on make run:

When running the project locally with make run, the Operand image provided will be stored as an environment variable in the config/manager/manager.yaml file.

Ensure you export the environment variable before running the project locally, such as:

export MEMCACHED_IMAGE="memcached:1.4.36-alpine"
Subcommands

The deploy-image plugin includes the following subcommand:

Affected files

When using the create api command with this plugin, the following files are affected, in addition to the existing Kubebuilder scaffolding:

Further Resources:

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4