Skip to content

Commit

Permalink
Adding docs for kapp controller v0.53.x
Browse files Browse the repository at this point in the history
Signed-off-by: Rohit Aggarwal <[email protected]>
  • Loading branch information
rohitagg2020 committed Jul 30, 2024
1 parent c85583b commit 771a712
Show file tree
Hide file tree
Showing 61 changed files with 5,150 additions and 33 deletions.
5 changes: 3 additions & 2 deletions site/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,16 @@ params:
name: kapp-controller
short_name: kc
root_link: /kapp-controller/
latest_docs_link: /kapp-controller/docs/v0.50.x/
latest_docs_link: /kapp-controller/docs/v0.53.x/
github_url: https://github.com/carvel-dev/kapp-controller
search: true
search_index_name: carvel-kapp-controller
search_api_key: a38560864c2e9128ae57d5734df438ff
versioning: true
version_latest: v0.50.x
version_latest: v0.53.x
versions:
- develop
- v0.53.x
- v0.50.x
- v0.49.x
- v0.48.x
Expand Down
2 changes: 1 addition & 1 deletion site/content/kapp-controller/docs/v0.50.x/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/]

title: "About kapp-controller"
toc: "false"
cascade:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/air-gapped-workflow]

title: Install Packages in an air-gapped (offline) environment
---

Expand Down
2 changes: 1 addition & 1 deletion site/content/kapp-controller/docs/v0.50.x/app-examples.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/app-examples]

title: Example Usage
---

Expand Down
2 changes: 1 addition & 1 deletion site/content/kapp-controller/docs/v0.50.x/app-overview.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/app-overview]

title: App CR High Level Overview
---

Expand Down
2 changes: 1 addition & 1 deletion site/content/kapp-controller/docs/v0.50.x/app-spec.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/app-spec]

title: App CR spec
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/authoring-command]

title: Authoring Commands Reference
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/controller-config]

title: Configuring the Controller
---

Expand Down
2 changes: 1 addition & 1 deletion site/content/kapp-controller/docs/v0.50.x/debugging-crs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/debugging-crs]

title: Debugging CRs
---

Expand Down
2 changes: 1 addition & 1 deletion site/content/kapp-controller/docs/v0.50.x/debugging-kc.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/debugging-kc]

title: Debugging kapp-controller
---

Expand Down
2 changes: 1 addition & 1 deletion site/content/kapp-controller/docs/v0.50.x/dev.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/dev]

title: Development & Deploy
---

Expand Down
2 changes: 1 addition & 1 deletion site/content/kapp-controller/docs/v0.50.x/faq.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/faq]

title: FAQ
---

Expand Down
2 changes: 1 addition & 1 deletion site/content/kapp-controller/docs/v0.50.x/install.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/install]

title: Install
---

Expand Down
4 changes: 2 additions & 2 deletions site/content/kapp-controller/docs/v0.50.x/kctrl-faq.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
aliases: [/kapp-controller/docs/latest/kctrl-faq]
aliases: [/kapp-controller/docs/latest/kctrl-faq]


title: "`kctrl` FAQ"
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
aliases: [/kapp-controller/docs/latest/kctrl-package-authoring]
aliases: [/kapp-controller/docs/latest/kctrl-package-authoring]


title: Authoring packages with kctrl
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/kctrl-package-tutorial]

title: Consuming Packages using the CLI
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/management-command]

title: Management Commands Reference
---

Expand Down
2 changes: 1 addition & 1 deletion site/content/kapp-controller/docs/v0.50.x/oss-packages.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/oss-packages]

title: OSS Carvel Packages
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/package-consumer-concepts]

title: Concepts for Package Consumers
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/package-install-extensions]

title: Overlays with PackageInstall
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/packaging-artifact-formats]

title: Artifact formats
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/packaging-gitops]

title: Package Management with GitOps
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/packaging-tutorial]

title: "Tutorial: Create and Install a Package"
---

Expand Down
2 changes: 1 addition & 1 deletion site/content/kapp-controller/docs/v0.50.x/packaging.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/packaging]

title: Package Management
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/private-registry-auth]

title: Authenticating to Private Registries
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/security-model]

title: Security Model
---

Expand Down
2 changes: 1 addition & 1 deletion site/content/kapp-controller/docs/v0.50.x/security.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/security]

title: Security
---

Expand Down
2 changes: 1 addition & 1 deletion site/content/kapp-controller/docs/v0.50.x/sops.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/sops]

title: Sops
---

Expand Down
2 changes: 1 addition & 1 deletion site/content/kapp-controller/docs/v0.50.x/startup.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/startup]

Title: Kapp Controller Startup
---

Expand Down
2 changes: 1 addition & 1 deletion site/content/kapp-controller/docs/v0.50.x/walkthrough.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
aliases: [/kapp-controller/docs/latest/walkthrough]

title: Install an Application
---

Expand Down
38 changes: 38 additions & 0 deletions site/content/kapp-controller/docs/v0.53.x/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
aliases: [/kapp-controller/docs/latest/]
title: "About kapp-controller"
toc: "false"
cascade:
version: v0.53.x
toc: "true"
type: docs
layout: docs
---

kapp-controller provides declarative APIs to customize, install, and update your Kubernetes applications and packages. It is a part of the Carvel toolkit and follows core Carvel design principles. Get started with the [tutorial](packaging-tutorial.md)!

The kapp-controller CLI `kctrl` ("k-control") helps users to observe and interact custom resources surfaced by kapp-controller effectively. It also allows package consumers get up and running with Carvel packages faster.

#### Choice for authors; consistency for consumers
Kubernetes configuration takes many forms -- plain YAML configurations, Helm charts, ytt templates, jsonnet templates, etc.
Software running on Kubernetes lives in many different places: a Git repository, an archive over HTTP, a Helm repository, etc.

kapp-controller provides software authors flexibility to choose their own configuration tools, while providing software consumers with consistent declarative APIs to customize, install, and update software on Kubernetes from various sources.

#### Lightweight and composable
kapp-controller breaks down the installation of applications and packages into three easy to understand steps:
- Fetch: get configuration and OCI images from various sources including a Git repository, a local ConfigMap, a Helm chart, an OCI registry, etc.
- Template: take user provided values to customize software using ytt templates, helm templates, and more
- Deploy: create/update resources on the cluster

#### GitOps and Continuous Delivery
With its layered approach, kapp-controller can be used as:
- Continuous delivery for Kubernetes applications using [App CR](app-spec.md)
- Kubernetes Package Management using [Package CR and supplementary CRs](packaging.md)
- Managing applications and packages using GitOps

#### Share software and build distributions
Use kapp-controller's Package Management features along with Carvel's imgpkg bundles to distribute Package Repositories that can be added to cluster to provide a catalog of software for users to install. Package Repositries can be automatically updated ensuring users always have access to latest versions of software. Package Repositories and Packages can also be relocated and run in air-gapped environments.

#### Reliable and ready for production!
kapp-controller has been hardened and is in use on production Kubernetes clusters. Learn more through [case studies](/blog/casestudy-modernizing-the-us-army) on our blog.
92 changes: 92 additions & 0 deletions site/content/kapp-controller/docs/v0.53.x/air-gapped-workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
aliases: [/kapp-controller/docs/latest/air-gapped-workflow]
title: Install Packages in an air-gapped (offline) environment
---

The documentation below covers topics from the [imgpkg air-gapped workflow docs](/imgpkg/docs/latest/air-gapped-workflow)
more concisely in order to focus on applying these workflows to kapp-controller package repositories.

## Scenario

You have a [PackageRepository](packaging#packagerepository-cr) in an [imgpkg bundle format](/imgpkg/docs/latest/resources/#bundle)
in an external OCI registry that you would like to move into an OCI registry in an air-gapped environment. Once relocated, you would
like to deploy the bundle as part of a PackageRepository to a Kubernetes cluster.

## Prerequisites

In order to go through this process of moving an imgpkg bundle to an air-gapped environment, you will need to have [imgpkg](/imgpkg)
installed. More information on installing Carvel tools, including `imgpkg`, can be found [here](/#whole-suite).

## Copy PackageRepository bundle to new location

Most of the steps documented for the [imgpkg air-gapped workflow docs](/imgpkg/docs/latest/air-gapped-workflow#step-1-finding-bundle-in-source-registry)
still apply in the case of working with kapp-controller package repositories. A summary of these docs is that you will need to copy your package repository
bundle with `imgpkg` via one of the following options:

- **Option 1:** From a common location connected to both registries. This option is more efficient because only changed image layers will be transferred between registries.
- **Option 2:** With intermediate tarball. This option works best when registries have no common network access.

More detailed documents for [Option 1](/imgpkg/docs/latest/air-gapped-workflow/#option-1-from-a-location-connected-to-both-registries) and
[Option 2](/imgpkg/docs/latest/air-gapped-workflow/#option-2-with-intermediate-tarball) can be found at the attached links.

A summary of steps for relocating a package repository bundle to an air-gapped environment are documented for both options below:

For **Option 1**:

1. Navigate to a location that can access both registries. If there is no such location, you have to use **Option 2** steps.
1. [Authenticate](/imgpkg/docs/latest/auth.md) with both source and destination registries.
1. Copy PackageRepository bundle to the new location by running:

```
imgpkg copy -b index.docker.io/user1/simple-app-bundle:v1.0.0 --to-repo final-registry.corp.com/apps/simple-app-bundle
```
For **Option 2**:
1. Navigate to a location that can access the source registry.
1. [Authenticate](/imgpkg/docs/latest/auth.md) with the source registry.
1. Compress PackageRepository bundle into a tarball file by running:
```
imgpkg copy -b index.docker.io/user1/simple-app-bundle:v1.0.0 --to-tar /tmp/my-image.tar
```
**Note:** Make sure the tar file is in a location that has access to the destination registry.
1. [Authenticate](/imgpkg/docs/latest/auth.md) with the destination registry.
1. Copy the tarball file to the new location by running:
```
imgpkg copy --tar /tmp/my-image.tar --to-repo final-registry.corp.com/apps/simple-app-bundle
```
## Use Relocated Bundle or Image with PackageRepository
Once you have relocated the package repository bundle into the destination OCI registry in your air-gapped environment, you can
now reference the relocated bundle in a PackageRepository definition:
```yaml
---
apiVersion: install.package.carvel.dev/v1alpha1
kind: PackageRepository
metadata:
name: simple-package-repository
spec:
fetch:
imgpkgBundle:
image: final-registry.corp.com/apps/simple-app-bundle
```

In the event your PackageRepository needs authentication to pull the bundle, you can read more about kapp-controller's
[private authentication workflows using secretgen-controller](private-registry-auth.md) or [without secretgen-controller](private-registry-auth.md#packagerepository-authentication-without-secretgen-controller).

After applying the PackageRepository definition above to your Kubernetes cluster, you will be able to check that the PackageRepository and
its associated Packages were successfully deployed by checking the PackageRepository status:

```bash
$ kubectl get packagerepository/simple-package-repository
```

You will see a message of `Reconcile Succeeded` in the `DESCRIPTION` column of the output from `kubectl` if the PackageRepository was deloyed
successfully. You can also run `kubectl get packages` to see that all Packages were introduced successfully.
Loading

0 comments on commit 771a712

Please sign in to comment.