-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version kapp-controller documentation
Signed-off-by: João Pereira <[email protected]>
- Loading branch information
1 parent
081a888
commit 7fd66b7
Showing
52 changed files
with
3,131 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
title: "About kapp-controller" | ||
toc: "false" | ||
cascade: | ||
version: v0.31.0 | ||
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)! | ||
|
||
#### 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. |
74 changes: 74 additions & 0 deletions
74
site/content/kapp-controller/docs/v0.31.0/air-gapped-workflow.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
--- | ||
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 transfered 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`: | ||
* Get to a location that can access both registries. If there is no such location, you will have to use `Option 2` steps. | ||
* [Authenticate](/imgpkg/docs/latest/auth.md) with both source and destination registries | ||
* Run `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`: | ||
* Get to a location that can access the source registry | ||
* [Authenticate](/imgpkg/docs/latest/auth.md) with the source registry | ||
* Run `imgpkg copy -b index.docker.io/user1/simple-app-bundle:v1.0.0 --to-tar /tmp/my-image.tar` | ||
* Make sure the tar file is in a location that has access to the destination registry | ||
* Authenticate with the destination registry | ||
* Run `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. |
107 changes: 107 additions & 0 deletions
107
site/content/kapp-controller/docs/v0.31.0/app-examples.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
--- | ||
title: Example Usage | ||
--- | ||
|
||
Below are some example App CRs showing common ways our users have used App CRs. Full App CR spec can be found [here](app-spec.md). | ||
|
||
## Gitops with an app | ||
In this example a user wants to keep their app up to date with changes to the source Git repo | ||
|
||
```yaml | ||
apiVersion: kappctrl.k14s.io/v1alpha1 | ||
kind: App | ||
metadata: | ||
name: simple-app | ||
spec: | ||
serviceAccountName: default | ||
fetch: | ||
- git: | ||
url: https://github.com/k14s/k8s-simple-app-example | ||
ref: origin/develop | ||
subPath: config-step-2-template | ||
|
||
template: | ||
- ytt: {} | ||
|
||
deploy: | ||
- kapp: {} | ||
``` | ||
## Gitops with a Helm chart | ||
In this example a user wants to keep their cluster up to date with the latest version of a Helm chart fetched from a Git repo | ||
```yaml | ||
apiVersion: kappctrl.k14s.io/v1alpha1 | ||
kind: App | ||
metadata: | ||
name: nginx-helm | ||
pec: | ||
fetch: | ||
- git: | ||
url: https://github.com/bitnami/charts | ||
ref: origin/master | ||
subPath: bitnami/nginx | ||
|
||
template: | ||
- helmTemplate: | ||
valuesFrom: | ||
- secretRef: | ||
name: nginx-values | ||
|
||
deploy: | ||
- kapp: {} | ||
``` | ||
## Install a Helm chart | ||
In this example a user wants to keep their cluster up to date with the latest version of a Helm chart | ||
```yaml | ||
apiVersion: kappctrl.k14s.io/v1alpha1 | ||
kind: App | ||
metadata: | ||
name: concourse-helm | ||
spec: | ||
fetch: | ||
- helmChart: | ||
name: stable/concourse | ||
|
||
template: | ||
- helmTemplate: | ||
valuesFrom: | ||
- secretRef: | ||
name: concourse-values | ||
|
||
deploy: | ||
- kapp: {} | ||
``` | ||
## Customize a Helm chart by adding an overlay | ||
In this example a user wants to use `helm template`, but then modify the resulting YAML by adding their own add their own `ytt overlay` | ||
```yaml | ||
apiVersion: kappctrl.k14s.io/v1alpha1 | ||
kind: App | ||
metadata: | ||
name: concourse-helm | ||
spec: | ||
fetch: | ||
- git: | ||
url: https://github.com/bitnami/charts | ||
ref: origin/master | ||
subPath: bitnami/nginx | ||
template: | ||
- helmTemplate: {} | ||
- ytt: | ||
ignoreUnknownComments: true | ||
inline: | ||
paths: | ||
remove-lb.yml: | | ||
#@ load("@ytt:overlay", "overlay") | ||
#@overlay/match by=overlay.subset({"kind":"Service","metadata":{"name":"nginx"}}) | ||
--- | ||
spec: | ||
type: ClusterIP | ||
#@overlay/remove | ||
externalTrafficPolicy: | ||
deploy: | ||
- kapp: {} | ||
``` |
Oops, something went wrong.