Skip to content

Commit

Permalink
doc: added documentation about deploying Camel K on k3s
Browse files Browse the repository at this point in the history
  • Loading branch information
orpiske authored and astefanutti committed Mar 17, 2021
1 parent ddc7b29 commit 2ac21c4
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/modules/ROOT/pages/installation/installation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ before installing it. Customized instructions are needed for the following clust
- xref:installation/gke.adoc[Google Kubernetes Engine (GKE)]
- xref:installation/openshift.adoc[OpenShift]
- xref:installation/iks.adoc[IBM Kubernetes Services (IKS)]
- xref:installation/k3s.adoc[K3s]

Other cluster types (such as OpenShift clusters) should *not need* prior configuration.

Expand Down
4 changes: 4 additions & 0 deletions docs/modules/ROOT/pages/installation/k3s.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[[installation-on-k3s]]
= Installing Camel K on K3s

Because K3s does not come with a builtin registry, you should follow the steps described on xref:installation/registry/k3s.adoc[Installing Camel K on K3s] to deploy it configure it to use a public or a private registry.
52 changes: 52 additions & 0 deletions docs/modules/ROOT/pages/installation/registry/k3s.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[[installation-on-k3s]]
= Installing Camel K on K3s

This guide assumes you've already deployed a https://k3s.io[K3s] cluster and have installed and configured the kubectl command to manage the cluster.

You can create a namespace to install Camel K on:

```
kubectl create namespace camel-k-test || true
```

Camel K needs a xref:installation/registry/registry.adoc[registry] to push the integrations it builds. For K3s you have to possibilities:

* You can configure Camel K installation to use the Docker registry, Quay.io or a similar publicly available registry, or;
* You can deploy your own private repository in the cluster or on your network.

[[public-registry]]
== Using a Public Registry

Most of the those registries require authentication to push images. Therefore, we have to create a secret the namespace that will contain the credentials to access it. To do so, you can execute:

*Note*: before running the command below, please make sure that you are logged in to the registry you are planning to use.

```
kubectl -n camel-k-test create secret generic my-registry-secret --from-file=$HOME/.docker/config.json
```

You can follow the steps described in the xref:installation/registry/registry.adoc[registry] documentation if you are deploying using a public registry, such as the https://hub.docker.com[DockerHub] or https://quay.io[Quay].


[[private-registry]]
== Using a Private Registry

Although K3s does not come with a private registry, one can be installed by following the steps described in the https://rancher.com/docs/k3s/latest/en/installation/private-registry/[K3s' private registry] documentation.

*Note*: installing your own registry gives you more flexibility to define how the registry should run, including the level of security required for it to run. More specifically, you can configure your registry to require or not credentials, to use HTTP instead of HTTPS, and so on. For the purpose of this guide and to present how Camel K can be installed on a seamless way, this guide demonstrates the installation using an insecure registry (unencrypted and without authentication).

[[installation]]
=== Installing Camel K on K3s with Private Registry

With the secret created on the cluster, we can install Camel K and tell it to use those credentials when pushing the integrations.

You can now download *kamel* CLI tool from https://github.com/apache/camel-k/releases[release page]
and put it on your system path.

After configure *kamel* CLI, you can execute the following command to install it on the namespace and configured to use your private registry:

```
kamel install -n camel-k-test --force --olm=false --registry address-of-the-registry --organization your-user-id-or-org --registry-insecure true
```

After doing that, you'll be ready to play with Camel K. Enjoy!

0 comments on commit 2ac21c4

Please sign in to comment.