We are presenting a keynote at KubeCon + CloudNativeCon North America 2021! Learn more.
Carvel Logo

Continuous delivery and package management for Kubernetes

kapp-controller's declarative APIs and layered approach enables you to build, deploy, and manage your own applications. It also helps package your software into easily distributable packages and enables your users to discover, configure, and install these packages on a Kubernetes cluster.

Kubernetes Developers

Build your application for Kubernetes and let kapp-controller continuously fetch configuration and images from a variety of sources (git, helm charts, OCI image registry, etc.), template using various tools (ytt, kbld, helm, etc.), and deploy out to a cluster.

Package Authors

Encapsulate, version, and distribute your software for others to install on a Kubernetes cluster. Share your software packages with users in the same cluster where they are developing.

Package Consumers

Discover, configure, and install versioned software on a Kubernetes cluster without needing to know all the underlying details. kapp-controller will continuously fetch, template, and deploy the installed package just like an application.

Basic Usages

Get more hands on with kapp-controller by watching the demo video below or a more in-depth demo video from our community meeting, taking it for spin through an interactive tutorial, or follow the same tutorial with your own Kubernetes cluster.

You can also see a high level overview of kapp-controller's custom resources below and jump into more in depth documentation for each workflow outlined.

Continuous Delivery

kapp-controller's App CR provides a lightweight, flexibile way to choose how to fetch, template, and deploy your application to Kubernetes. It can be used independently of kapp-controller's package management CRs, to assist in the creation of Package CRs, or kapp-controller will create one for you as a result of creating a PackageInstall CR.

apiVersion: kappctrl.k14s.io/v1alpha1
kind: App
metadata:
  name: simple-app
  namespace: default
spec:
  serviceAccountName: default-ns-sa
  fetch:
  - git:
      url: https://github.com/vmware-tanzu/carvel-simple-app-on-kubernetes
      ref: origin/develop
      subPath: config-step-2-template
  template:
  - ytt: {}
  deploy:
  - kapp: {}

Apply the App CR to your cluster and verify the deployment was successful:

$ kubectl apply -f simple-app.yml

$ kubectl get app simple-app

NAME         DESCRIPTION           SINCE-DEPLOY   AGE
simple-app   Reconcile succeeded   9s             10s

Discover more in the App walkthrough documentation.

Package authoring

kapp-controller's Package CR provides a way to share versioned software for Kubernetes so users can easily discover and consume available software.

apiVersion: data.packaging.carvel.dev/v1alpha1
kind: Package
metadata:
  name: simple-app.corp.com.1.0.0
spec:
  refName: simple-app.corp.com
  version: 1.0.0
  releaseNotes: |
        Initial release of the simple app package
  template:
    spec:
      fetch:
      - imgpkgBundle:
          image: index.docker.io/k8slt/kctrl-example-pkg@sha256:8ffa7f9352149dba1d539d0006b38eda357917edcdd39b82497a61dab2c27b75
      template:
      - ytt:
          paths:
          - config/
      - kbld:
          paths:
          - '-'
          - .imgpkg/images.yml
      deploy:
      - kapp: {}
  valuesSchema:
    openAPIv3:
      title: simple-app.corp.com values schema
      examples:
      - svc_port: 80
        app_port: 80
        hello_msg: stranger
      properties:
        svc_port:
          type: integer
          description: Port number for the service.
          default: 80
          examples:
          - 80
        app_port:
          type: integer
          description: Target port for the application.
          default: 80
          examples:
          - 80
        hello_msg:
          type: string
          description: Name used in hello message from app when app is pinged.
          default: stranger
          examples:
          - stranger

Discover more in the package author documentation.

Package consumption

kapp-controller's PackageRepository CR adds a collection of Packages to allow software to be easily discovered and installed.

apiVersion: packaging.carvel.dev/v1alpha1
kind: PackageRepository
metadata:
  name: simple-package-repository
  namespace: default
spec:
  fetch:
    imgpkgBundle:
      image: k8slt/corp-com-pkg-repo:1.0.0

Apply the PackageRepository to your cluster and view available software packages with kubectl:

$ kubectl apply -f repository.yml

$ kubectl get packages
NAME                             PACKAGEMETADATA NAME   VERSION      AGE
simple-app.corp.com.1.0.0        simple-app.corp.com    1.0.0        1m50s
simple-app.corp.com.2.0.0        simple-app.corp.com    2.0.0        1m50s
simple-app.corp.com.3.0.0-rc.1   simple-app.corp.com    3.0.0-rc.1   1m50s

kapp-controller's PackageInstall CR provides users a way to install Packages on a Kubernetes cluster.

apiVersion: packaging.carvel.dev/v1alpha1
kind: PackageInstall
metadata:
  name: pkg-demo
  namespace: default
spec:
  serviceAccountName: default-ns-sa
  packageRef:
    refName: simple-app.corp.com
    versionSelection:
      constraints: 1.0.0

Apply the PackageInstall to your cluster and verify the Package was installed successfully:

$ kubectl apply -f packageinstall.yml

$ kubectl get packageinstall pkg-demo
    
NAME       PACKAGE NAME          PACKAGE VERSION   DESCRIPTION           AGE
pkg-demo   simple-app.corp.com   1.0.0             Reconcile succeeded   1m50s

View the App CR created as a result of the PackageInstall creation:

$ kubectl get app pkg-demo

NAME         DESCRIPTION           SINCE-DEPLOY   AGE
pkg-demo     Reconcile succeeded   9s             1m45s

Discover more in the package consumption documentation.

Getting started

To help you get started, see the documentation.