4.5. Working with bundle images


You can use the Operator SDK to package Operators using the Bundle Format.

4.5.1. Building a bundle image

You can build, push, and validate an Operator bundle image using the Operator SDK.

Prerequisites

  • Operator SDK version 0.17.2
  • podman version 1.4.4+
  • An Operator project generated using the Operator SDK

Procedure

  1. From your Operator project directory, build the bundle image using the Operator SDK:

    $ operator-sdk bundle create \
        quay.io/<namespace>/test-operator:v0.1.0 \
    1
    
        -b podman 
    2
    Copy to Clipboard Toggle word wrap
    1
    The image tag that you want the bundle image to have.
    2
    The CLI tool to use for building the container image, either docker (default), podman, or buildah. This example uses podman.
    注意

    If your local manifests are not located in the default <project_root>/deploy/olm-catalog/test-operator/manifests, specify the location with the --directory flag.

  2. Log in to the registry where you want to push the bundle image. For example:

    $ podman login quay.io
    Copy to Clipboard Toggle word wrap
  3. Push the bundle image to the registry:

    $ podman push quay.io/<namespace>/test-operator:v0.1.0
    Copy to Clipboard Toggle word wrap
  4. Validate the bundle image in the remote registry:

    $ operator-sdk bundle validate \
        quay.io/<namespace>/test-operator:v0.1.0 \
        -b podman
    Copy to Clipboard Toggle word wrap

    Example output

    INFO[0000] Unpacked image layers                                 bundle-dir=/tmp/bundle-041168359 container-tool=podman
    INFO[0000] running podman pull                                   bundle-dir=/tmp/bundle-041168359 container-tool=podman
    INFO[0002] running podman save                                   bundle-dir=/tmp/bundle-041168359 container-tool=podman
    INFO[0002] All validation tests have completed successfully      bundle-dir=/tmp/bundle-041168359 container-tool=podman
    Copy to Clipboard Toggle word wrap

4.5.2. Additional resources

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat