diff --git a/calico-enterprise/getting-started/compatibility.mdx b/calico-enterprise/getting-started/compatibility.mdx index 9922b241b2..d07845345d 100644 --- a/calico-enterprise/getting-started/compatibility.mdx +++ b/calico-enterprise/getting-started/compatibility.mdx @@ -18,6 +18,7 @@ The following list shows the platforms supported in this release. If you're work - [RKE](#rke) - [RKE2](#rke2) - [TKG](#tkg) +- [Charmed Kubernetes](#charmed-kubernetes) ### Supported $[prodname] features @@ -103,6 +104,14 @@ Kubernetes version support aligns with [upstream Kubernetes](#kubernetes-kubeadm | 3.21 | 2.4 | $[prodname] CNI with network policy | 1.27 | | 3.20 | 2.4 | $[prodname] CNI with network policy | 1.27 | +## Charmed Kubernetes + +Kubernetes version support aligns with [upstream Kubernetes](#kubernetes-kubeadm) to the latest version if available. + +| $[prodname] version | $[prodname] support | +| ----------------------- | ----------------------------------------------------------------------------------------- | +| 3.20 to current release | - $[prodname] CNI with network policy | + ## Supported browsers The following list shows the browsers supported by $[prodname] in this release. diff --git a/calico-enterprise/getting-started/index.mdx b/calico-enterprise/getting-started/index.mdx index 8be62fd8b1..9da4c78087 100644 --- a/calico-enterprise/getting-started/index.mdx +++ b/calico-enterprise/getting-started/index.mdx @@ -24,6 +24,7 @@ Requirements and guides for installing Calico Enterprise on Kubernetes clusters + diff --git a/calico-enterprise/getting-started/install-on-clusters/charmed-k8s.mdx b/calico-enterprise/getting-started/install-on-clusters/charmed-k8s.mdx new file mode 100644 index 0000000000..b8607b7935 --- /dev/null +++ b/calico-enterprise/getting-started/install-on-clusters/charmed-k8s.mdx @@ -0,0 +1,383 @@ +--- +description: Install Calico Enterprise on a Charmed Kubernetes cluster. +title: Charmed Kubernetes +--- + +import InstallGeneric from '@site/calico-enterprise/_includes/components/InstallGeneric'; +import Admonition from '@theme/Admonition'; + +# Install $[prodname] on a Charmed Kubernetes cluster + +This guide describes how to install $[prodname] on a Charmed Kubernetes cluster. + +## Before you begin + +**CNI support** + +- Calico CNI for networking with $[prodname] network policy + + The geeky details of what you get by default: + + + +**Required** + +- Your cluster meets the [system requirements](requirements.mdx) +- A [compatible Charmed Kubernetes cluster](../compatibility.mdx#charmed-kubernetes) +- A [compatible Charmed Kubernetes bundle](https://github.com/charmed-kubernetes/bundle/tree/main/releases) configured without a CNI +- A [Tigera license key and credentials](calico-enterprise.mdx) +- [Install kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) on your workstation +- [Install juju](https://juju.is/docs/juju/install-juju) on your workstation (if managing the cluster directly) + +## Prepare a compatible cluster for $[prodname] using a modified bundle file + +For the best results, you should create a new Charmed Kubernetes cluster without a CNI, and then install $[prodname] on that cluster. +This ensures proper configuration and compatibility for a smooth installation process. + +By default, Charmed Kubernetes clusters include a managed version of Calico Open Source. +Migrating from this managed version of Calico Open Source to Calico Enterprise is not supported. + +To create a Charmed Kubernetes cluster without a CNI, you can customize your deployment by using a bundle overlay file. +See the [Charmed Kubernetes documentation](https://ubuntu.com/kubernetes/charmed-k8s/docs/install-manual#editing-a-bundle) for more information on this installation method. + +1. Copy one of the default bundle files located in [Charmed Kubernetes Github Releases](https://github.com/charmed-kubernetes/bundle/tree/main/releases). + + For example, to get the default bundle for the v1.33 charmed kubernetes release: + + ```bash + curl -o charmed-kubernetes-bundle.yaml -L https://raw.githubusercontent.com/charmed-kubernetes/bundle/refs/heads/main/releases/1.33/bundle.yaml + ``` + +
+ + Example of default Charmed Kubernetes bundle file + + An example of a default bundle file with the `calico` charm: + ```yaml + description: A highly-available, production-grade Kubernetes cluster. + docs: https://discourse.charmhub.io/t/charmed-kubernetes-bundle/14447 + issues: https://bugs.launchpad.net/charmed-kubernetes-bundles + series: noble + source: https://github.com/charmed-kubernetes/bundle + website: https://ubuntu.com/kubernetes/charmed-k8s + name: charmed-kubernetes + applications: + // highlight-start + calico: + annotations: + gui-x: '475' + gui-y: '605' + channel: 1.33/stable + charm: calico + options: + vxlan: Always + // highlight-end + containerd: + annotations: + gui-x: '475' + gui-y: '800' + channel: 1.33/stable + charm: containerd + easyrsa: + annotations: + gui-x: '90' + gui-y: '420' + channel: 1.33/stable + charm: easyrsa + constraints: cores=1 mem=4G root-disk=16G + num_units: 1 + etcd: + annotations: + gui-x: '800' + gui-y: '420' + channel: 1.33/stable + charm: etcd + constraints: cores=2 mem=8G root-disk=16G + num_units: 3 + options: + channel: 3.4/stable + kubeapi-load-balancer: + annotations: + gui-x: '450' + gui-y: '250' + channel: 1.33/stable + charm: kubeapi-load-balancer + constraints: cores=1 mem=4G root-disk=16G + expose: true + num_units: 1 + kubernetes-control-plane: + annotations: + gui-x: '800' + gui-y: '850' + channel: 1.33/stable + charm: kubernetes-control-plane + constraints: cores=2 mem=8G root-disk=16G + num_units: 2 + options: + channel: 1.33/stable + kubernetes-worker: + annotations: + gui-x: '90' + gui-y: '850' + channel: 1.33/stable + charm: kubernetes-worker + constraints: cores=2 mem=8G root-disk=16G + expose: true + num_units: 3 + options: + channel: 1.33/stable + relations: + - - kubernetes-control-plane:loadbalancer-external + - kubeapi-load-balancer:lb-consumers + - - kubernetes-control-plane:loadbalancer-internal + - kubeapi-load-balancer:lb-consumers + - - kubernetes-control-plane:kube-control + - kubernetes-worker:kube-control + - - kubernetes-control-plane:certificates + - easyrsa:client + - - etcd:certificates + - easyrsa:client + - - kubernetes-control-plane:etcd + - etcd:db + - - kubernetes-worker:certificates + - easyrsa:client + - - kubeapi-load-balancer:certificates + - easyrsa:client + // highlight-start + - - calico:etcd + - etcd:db + - - calico:cni + - kubernetes-control-plane:cni + - - calico:cni + - kubernetes-worker:cni + // highlight-end + - - containerd:containerd + - kubernetes-worker:container-runtime + - - containerd:containerd + - kubernetes-control-plane:container-runtime + ``` + +
+ +1. Remove all references to the `calico` charm from the bundle file: + + 1. Remove the calico application from the `applications` section. + ```yaml title="Default text to be removed" + calico: + annotations: + gui-x: '475' + gui-y: '605' + channel: 1.33/stable + charm: calico + options: + vxlan: Always + ``` + 1. Remove all calico relations from the `relations` section. + ```yaml title="Default text to be removed" + - - calico:etcd + - etcd:db + - - calico:cni + - kubernetes-control-plane:cni + - - calico:cni + - kubernetes-worker:cni + ``` + + Your default bundle file should now look like this: + +
+ + Example of modified Charmed Kubernetes bundle (no CNI) + + An example of a default bundle file with the `calico` charm: + ```yaml + description: A highly-available, production-grade Kubernetes cluster. + docs: https://discourse.charmhub.io/t/charmed-kubernetes-bundle/14447 + issues: https://bugs.launchpad.net/charmed-kubernetes-bundles + series: noble + source: https://github.com/charmed-kubernetes/bundle + website: https://ubuntu.com/kubernetes/charmed-k8s + name: charmed-kubernetes + applications: + containerd: + annotations: + gui-x: '475' + gui-y: '800' + channel: 1.33/stable + charm: containerd + easyrsa: + annotations: + gui-x: '90' + gui-y: '420' + channel: 1.33/stable + charm: easyrsa + constraints: cores=1 mem=4G root-disk=16G + num_units: 1 + etcd: + annotations: + gui-x: '800' + gui-y: '420' + channel: 1.33/stable + charm: etcd + constraints: cores=2 mem=8G root-disk=16G + num_units: 3 + options: + channel: 3.4/stable + kubeapi-load-balancer: + annotations: + gui-x: '450' + gui-y: '250' + channel: 1.33/stable + charm: kubeapi-load-balancer + constraints: cores=1 mem=4G root-disk=16G + expose: true + num_units: 1 + kubernetes-control-plane: + annotations: + gui-x: '800' + gui-y: '850' + channel: 1.33/stable + charm: kubernetes-control-plane + constraints: cores=2 mem=8G root-disk=16G + num_units: 2 + options: + channel: 1.33/stable + kubernetes-worker: + annotations: + gui-x: '90' + gui-y: '850' + channel: 1.33/stable + charm: kubernetes-worker + constraints: cores=2 mem=8G root-disk=16G + expose: true + num_units: 3 + options: + channel: 1.33/stable + relations: + - - kubernetes-control-plane:loadbalancer-external + - kubeapi-load-balancer:lb-consumers + - - kubernetes-control-plane:loadbalancer-internal + - kubeapi-load-balancer:lb-consumers + - - kubernetes-control-plane:kube-control + - kubernetes-worker:kube-control + - - kubernetes-control-plane:certificates + - easyrsa:client + - - etcd:certificates + - easyrsa:client + - - kubernetes-control-plane:etcd + - etcd:db + - - kubernetes-worker:certificates + - easyrsa:client + - - kubeapi-load-balancer:certificates + - easyrsa:client + - - calico:etcd + - etcd:db + - - containerd:containerd + - kubernetes-worker:container-runtime + - - containerd:containerd + - kubernetes-control-plane:container-runtime + ``` +
+ +## Set up Juju and deploy a cluster without a CNI + +1. Configure juju with a default credential by adding a new credential or using an existing credential: + ``` + juju add-credential + ``` + +1. Create the controller with a unique name and use the credential created in Step 1: + ``` + juju bootstrap --credential + ``` + +1. Create the model with a unique name: + ``` + juju add-model + ``` + +1. Create the Charmed Kubernetes cluster by specifying the modified bundle file:: + ``` + juju deploy ./charmed-kubernetes-bundle.yaml + ``` + +1. If you notice that the `kubernetes-control-plane` and `kubernetes-worker` are in waiting status due to missing CNI, this can be prevented by setting `ignore-missing-cni=true` in the `kubernetes-control-plane` and `kubernetes-worker` charms by running: + ```bash + juju config kubernetes-control-plane ignore-missing-cni=true + juju config kubernetes-worker ignore-missing-cni=true + ``` + + :::note + The `ignore-missing-cni=true` configuration allows the `kubernetes-control-plane` and `kubernetes-worker` charms to be ready without waiting for a CNI plugin to be installed since $[prodname] will provide its own. + ::: + +1. To allow setup of the CNI to be taken care of by $[prodname], the `kubernetes-control-plane` charm also needs to allow privileged pods by running: + ```bash + juju config kubernetes-control-plane allow-privileged=true + ``` + + :::note + The `allow-privileged=true` configuration enables privileged containers which are required to let $[prodname] setup the CNI by deploying its own calico-node daemonset. + ::: + +1. Ensure the applications and units are active in the model by running: + ```bash + juju status + ``` + The charmed kubernetes cluster should be healthy within an hour. + + :::note + It is expected that the `kubernetes-control-plane` application should be in waiting status because it is waiting for kube-system pods to start. All other statuses should be active before proceeding to install $[prodname]. Example status: + ``` + App Version Status Scale Charm Channel Rev Exposed Message + containerd 1.6.38 active 5 containerd 1.33/stable 90 no Container runtime available + easyrsa v3.0.9 active 1 easyrsa 1.33/stable 74 no Certificate Authority connected. + etcd 3.4.37 active 3 etcd 1.33/stable 788 no Healthy with 3 known peers + kubeapi-load-balancer 1.18.0 active 1 kubeapi-load-balancer 1.33/stable 196 yes Ready + kubernetes-control-plane 1.33.x waiting 2 kubernetes-control-plane 1.33/stable 652 no Waiting for 3 kube-system pods to start + kubernetes-worker 1.33.x active 3 kubernetes-worker 1.33/stable 369 yes Ready + ``` + ::: + +1. Ensure the Charmed Kubernetes model and its applications are stable by running: + ```bash + juju wait-for model --query='life=="alive" && status=="available"' + ``` + +1. Ensure the Charmed Kubernetes applications are stable by running: + ```bash + applications=("easyrsa" "containerd" "etcd" "kubernetes-worker" "kubeapi-load-balancer") + for i in "${!applications[@]}"; do + app="${applications[$i]}"; + juju wait-for application $app; + done + ``` + +1. Get the kubeconfig from the `kubernetes-control-plane` application by running: + ```bash + juju scp kubernetes-control-plane/0:config kubeconfig + ``` + +## Install $[prodname] + +:::caution +For Charmed Kubernetes clusters, you cannot use AWS EBS storage classes. You must configure an alternative storage solution such as local storage or another compatible storage provider. +::: + + + +## Next steps + +- [Configure access to the $[prodname] web console](../../operations/cnx/access-the-manager.mdx) +- [Get started with Kubernetes network policy](../../network-policy/get-started/kubernetes-network-policy.mdx) +- [Get started with $[prodname] network policy](../../network-policy/beginners/calico-network-policy.mdx) +- [Enable default deny for Kubernetes pods](../../network-policy/beginners/kubernetes-default-deny.mdx) + +**Additional resources** + +- [Charmed Kubernetes documentation](https://ubuntu.com/kubernetes/charmed-k8s/docs/install-manual) +- [Charmed Kubernetes quickstart](https://ubuntu.com/kubernetes/charmed-k8s/docs/quickstart) +- [Juju documentation](https://juju.is/docs) +- [Canonical Kubernetes operations](https://ubuntu.com/kubernetes/docs) diff --git a/calico-enterprise_versioned_docs/version-3.20-2/getting-started/compatibility.mdx b/calico-enterprise_versioned_docs/version-3.20-2/getting-started/compatibility.mdx index 9d46957898..f3016c42fc 100644 --- a/calico-enterprise_versioned_docs/version-3.20-2/getting-started/compatibility.mdx +++ b/calico-enterprise_versioned_docs/version-3.20-2/getting-started/compatibility.mdx @@ -18,6 +18,7 @@ The following list shows the platforms supported in this release. If you're work - [RKE](#rke) - [RKE2](#rke2) - [TKG](#tkg) +- [Charmed Kubernetes](#charmed-kubernetes) ### Supported $[prodname] features @@ -105,6 +106,14 @@ Kubernetes version support aligns with [upstream Kubernetes](#kubernetes-kubeadm | 3.19 | 2.4 | $[prodname] CNI with network policy | 1.27 | | 3.18 | 2.4 | $[prodname] CNI with network policy | 1.27 | +## Charmed Kubernetes + +Kubernetes version support aligns with [upstream Kubernetes](#kubernetes-kubeadm) to the latest version if available. + +| $[prodname] version | $[prodname] support | +| ----------------------- | ----------------------------------------------------------------------------------------- | +| 3.20 to current release | - $[prodname] CNI with network policy | + ## Supported browsers The following list shows the browsers supported by $[prodname] in this release. diff --git a/calico-enterprise_versioned_docs/version-3.20-2/getting-started/index.mdx b/calico-enterprise_versioned_docs/version-3.20-2/getting-started/index.mdx index 8be62fd8b1..9da4c78087 100644 --- a/calico-enterprise_versioned_docs/version-3.20-2/getting-started/index.mdx +++ b/calico-enterprise_versioned_docs/version-3.20-2/getting-started/index.mdx @@ -24,6 +24,7 @@ Requirements and guides for installing Calico Enterprise on Kubernetes clusters + diff --git a/calico-enterprise_versioned_docs/version-3.20-2/getting-started/install-on-clusters/charmed-k8s.mdx b/calico-enterprise_versioned_docs/version-3.20-2/getting-started/install-on-clusters/charmed-k8s.mdx new file mode 100644 index 0000000000..3e5a957707 --- /dev/null +++ b/calico-enterprise_versioned_docs/version-3.20-2/getting-started/install-on-clusters/charmed-k8s.mdx @@ -0,0 +1,383 @@ +--- +description: Install Calico Enterprise on a Charmed Kubernetes cluster. +title: Charmed Kubernetes +--- + +import InstallGeneric from '@site/calico-enterprise_versioned_docs/version-3.20-2/_includes/components/InstallGeneric'; +import Admonition from '@theme/Admonition'; + +# Install $[prodname] on a Charmed Kubernetes cluster + +This guide describes how to install $[prodname] on a Charmed Kubernetes cluster. + +## Before you begin + +**CNI support** + +- Calico CNI for networking with $[prodname] network policy + + The geeky details of what you get by default: + + + +**Required** + +- Your cluster meets the [system requirements](requirements.mdx) +- A [compatible Charmed Kubernetes cluster](../compatibility.mdx#charmed-kubernetes) +- A [compatible Charmed Kubernetes bundle](https://github.com/charmed-kubernetes/bundle/tree/main/releases) configured without a CNI +- A [Tigera license key and credentials](calico-enterprise.mdx) +- [Install kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) on your workstation +- [Install juju](https://juju.is/docs/juju/install-juju) on your workstation (if managing the cluster directly) + +## Prepare a compatible cluster for $[prodname] using a modified bundle file + +For the best results, you should create a new Charmed Kubernetes cluster without a CNI, and then install $[prodname] on that cluster. +This ensures proper configuration and compatibility for a smooth installation process. + +By default, Charmed Kubernetes clusters include a managed version of Calico Open Source. +Migrating from this managed version of Calico Open Source to Calico Enterprise is not supported. + +To create a Charmed Kubernetes cluster without a CNI, you can customize your deployment by using a bundle overlay file. +See the [Charmed Kubernetes documentation](https://ubuntu.com/kubernetes/charmed-k8s/docs/install-manual#editing-a-bundle) for more information on this installation method. + +1. Copy one of the default bundle files located in [Charmed Kubernetes Github Releases](https://github.com/charmed-kubernetes/bundle/tree/main/releases). + + For example, to get the default bundle for the v1.31 charmed kubernetes release: + + ```bash + curl -o charmed-kubernetes-bundle.yaml -L https://raw.githubusercontent.com/charmed-kubernetes/bundle/refs/heads/main/releases/1.31/bundle.yaml + ``` + +
+ + Example of default Charmed Kubernetes bundle file + + An example of a default bundle file with the `calico` charm: + ```yaml + description: A highly-available, production-grade Kubernetes cluster. + docs: https://discourse.charmhub.io/t/charmed-kubernetes-bundle/14447 + issues: https://bugs.launchpad.net/charmed-kubernetes-bundles + series: noble + source: https://github.com/charmed-kubernetes/bundle + website: https://ubuntu.com/kubernetes/charmed-k8s + name: charmed-kubernetes + applications: + // highlight-start + calico: + annotations: + gui-x: '475' + gui-y: '605' + channel: 1.31/stable + charm: calico + options: + vxlan: Always + // highlight-end + containerd: + annotations: + gui-x: '475' + gui-y: '800' + channel: 1.31/stable + charm: containerd + easyrsa: + annotations: + gui-x: '90' + gui-y: '420' + channel: 1.31/stable + charm: easyrsa + constraints: cores=1 mem=4G root-disk=16G + num_units: 1 + etcd: + annotations: + gui-x: '800' + gui-y: '420' + channel: 1.31/stable + charm: etcd + constraints: cores=2 mem=8G root-disk=16G + num_units: 3 + options: + channel: 3.4/stable + kubeapi-load-balancer: + annotations: + gui-x: '450' + gui-y: '250' + channel: 1.31/stable + charm: kubeapi-load-balancer + constraints: cores=1 mem=4G root-disk=16G + expose: true + num_units: 1 + kubernetes-control-plane: + annotations: + gui-x: '800' + gui-y: '850' + channel: 1.31/stable + charm: kubernetes-control-plane + constraints: cores=2 mem=8G root-disk=16G + num_units: 2 + options: + channel: 1.31/stable + kubernetes-worker: + annotations: + gui-x: '90' + gui-y: '850' + channel: 1.31/stable + charm: kubernetes-worker + constraints: cores=2 mem=8G root-disk=16G + expose: true + num_units: 3 + options: + channel: 1.31/stable + relations: + - - kubernetes-control-plane:loadbalancer-external + - kubeapi-load-balancer:lb-consumers + - - kubernetes-control-plane:loadbalancer-internal + - kubeapi-load-balancer:lb-consumers + - - kubernetes-control-plane:kube-control + - kubernetes-worker:kube-control + - - kubernetes-control-plane:certificates + - easyrsa:client + - - etcd:certificates + - easyrsa:client + - - kubernetes-control-plane:etcd + - etcd:db + - - kubernetes-worker:certificates + - easyrsa:client + - - kubeapi-load-balancer:certificates + - easyrsa:client + // highlight-start + - - calico:etcd + - etcd:db + - - calico:cni + - kubernetes-control-plane:cni + - - calico:cni + - kubernetes-worker:cni + // highlight-end + - - containerd:containerd + - kubernetes-worker:container-runtime + - - containerd:containerd + - kubernetes-control-plane:container-runtime + ``` + +
+ +1. Remove all references to the `calico` charm from the bundle file: + + 1. Remove the calico application from the `applications` section. + ```yaml title="Default text to be removed" + calico: + annotations: + gui-x: '475' + gui-y: '605' + channel: 1.31/stable + charm: calico + options: + vxlan: Always + ``` + 1. Remove all calico relations from the `relations` section. + ```yaml title="Default text to be removed" + - - calico:etcd + - etcd:db + - - calico:cni + - kubernetes-control-plane:cni + - - calico:cni + - kubernetes-worker:cni + ``` + + Your default bundle file should now look like this: + +
+ + Example of modified Charmed Kubernetes bundle (no CNI) + + An example of a default bundle file with the `calico` charm: + ```yaml + description: A highly-available, production-grade Kubernetes cluster. + docs: https://discourse.charmhub.io/t/charmed-kubernetes-bundle/14447 + issues: https://bugs.launchpad.net/charmed-kubernetes-bundles + series: noble + source: https://github.com/charmed-kubernetes/bundle + website: https://ubuntu.com/kubernetes/charmed-k8s + name: charmed-kubernetes + applications: + containerd: + annotations: + gui-x: '475' + gui-y: '800' + channel: 1.31/stable + charm: containerd + easyrsa: + annotations: + gui-x: '90' + gui-y: '420' + channel: 1.31/stable + charm: easyrsa + constraints: cores=1 mem=4G root-disk=16G + num_units: 1 + etcd: + annotations: + gui-x: '800' + gui-y: '420' + channel: 1.31/stable + charm: etcd + constraints: cores=2 mem=8G root-disk=16G + num_units: 3 + options: + channel: 3.4/stable + kubeapi-load-balancer: + annotations: + gui-x: '450' + gui-y: '250' + channel: 1.31/stable + charm: kubeapi-load-balancer + constraints: cores=1 mem=4G root-disk=16G + expose: true + num_units: 1 + kubernetes-control-plane: + annotations: + gui-x: '800' + gui-y: '850' + channel: 1.31/stable + charm: kubernetes-control-plane + constraints: cores=2 mem=8G root-disk=16G + num_units: 2 + options: + channel: 1.31/stable + kubernetes-worker: + annotations: + gui-x: '90' + gui-y: '850' + channel: 1.31/stable + charm: kubernetes-worker + constraints: cores=2 mem=8G root-disk=16G + expose: true + num_units: 3 + options: + channel: 1.31/stable + relations: + - - kubernetes-control-plane:loadbalancer-external + - kubeapi-load-balancer:lb-consumers + - - kubernetes-control-plane:loadbalancer-internal + - kubeapi-load-balancer:lb-consumers + - - kubernetes-control-plane:kube-control + - kubernetes-worker:kube-control + - - kubernetes-control-plane:certificates + - easyrsa:client + - - etcd:certificates + - easyrsa:client + - - kubernetes-control-plane:etcd + - etcd:db + - - kubernetes-worker:certificates + - easyrsa:client + - - kubeapi-load-balancer:certificates + - easyrsa:client + - - calico:etcd + - etcd:db + - - containerd:containerd + - kubernetes-worker:container-runtime + - - containerd:containerd + - kubernetes-control-plane:container-runtime + ``` +
+ +## Set up Juju and deploy a cluster without a CNI + +1. Configure juju with a default credential by adding a new credential or using an existing credential: + ``` + juju add-credential + ``` + +1. Create the controller with a unique name and use the credential created in Step 1: + ``` + juju bootstrap --credential + ``` + +1. Create the model with a unique name: + ``` + juju add-model + ``` + +1. Create the Charmed Kubernetes cluster by specifying the modified bundle file:: + ``` + juju deploy ./charmed-kubernetes-bundle.yaml + ``` + +1. If you notice that the `kubernetes-control-plane` and `kubernetes-worker` are in waiting status due to missing CNI, this can be prevented by setting `ignore-missing-cni=true` in the `kubernetes-control-plane` and `kubernetes-worker` charms by running: + ```bash + juju config kubernetes-control-plane ignore-missing-cni=true + juju config kubernetes-worker ignore-missing-cni=true + ``` + + :::note + The `ignore-missing-cni=true` configuration allows the `kubernetes-control-plane` and `kubernetes-worker` charms to be ready without waiting for a CNI plugin to be installed since $[prodname] will provide its own. + ::: + +1. To allow setup of the CNI to be taken care of by $[prodname], the `kubernetes-control-plane` charm also needs to allow privileged pods by running: + ```bash + juju config kubernetes-control-plane allow-privileged=true + ``` + + :::note + The `allow-privileged=true` configuration enables privileged containers which are required to let $[prodname] setup the CNI by deploying its own calico-node daemonset. + ::: + +1. Ensure the applications and units are active in the model by running: + ```bash + juju status + ``` + The charmed kubernetes cluster should be healthy within an hour. + + :::note + It is expected that the `kubernetes-control-plane` application should be in waiting status because it is waiting for kube-system pods to start. All other statuses should be active before proceeding to install $[prodname]. Example status: + ``` + App Version Status Scale Charm Channel Rev Exposed Message + containerd 1.6.38 active 5 containerd 1.31/stable 90 no Container runtime available + easyrsa v3.0.9 active 1 easyrsa 1.31/stable 74 no Certificate Authority connected. + etcd 3.4.37 active 3 etcd 1.31/stable 788 no Healthy with 3 known peers + kubeapi-load-balancer 1.18.0 active 1 kubeapi-load-balancer 1.31/stable 196 yes Ready + kubernetes-control-plane 1.31.x waiting 2 kubernetes-control-plane 1.31/stable 652 no Waiting for 3 kube-system pods to start + kubernetes-worker 1.31.x active 3 kubernetes-worker 1.31/stable 369 yes Ready + ``` + ::: + +1. Ensure the Charmed Kubernetes model and its applications are stable by running: + ```bash + juju wait-for model --query='life=="alive" && status=="available"' + ``` + +1. Ensure the Charmed Kubernetes applications are stable by running: + ```bash + applications=("easyrsa" "containerd" "etcd" "kubernetes-worker" "kubeapi-load-balancer") + for i in "${!applications[@]}"; do + app="${applications[$i]}"; + juju wait-for application $app; + done + ``` + +1. Get the kubeconfig from the `kubernetes-control-plane` application by running: + ```bash + juju scp kubernetes-control-plane/0:config kubeconfig + ``` + +## Install $[prodname] + +:::caution +For Charmed Kubernetes clusters, you cannot use AWS EBS storage classes. You must configure an alternative storage solution such as local storage or another compatible storage provider. +::: + + + +## Next steps + +- [Configure access to the $[prodname] web console](../../operations/cnx/access-the-manager.mdx) +- [Get started with Kubernetes network policy](../../network-policy/get-started/kubernetes-network-policy.mdx) +- [Get started with $[prodname] network policy](../../network-policy/beginners/calico-network-policy.mdx) +- [Enable default deny for Kubernetes pods](../../network-policy/beginners/kubernetes-default-deny.mdx) + +**Additional resources** + +- [Charmed Kubernetes documentation](https://ubuntu.com/kubernetes/charmed-k8s/docs/install-manual) +- [Charmed Kubernetes quickstart](https://ubuntu.com/kubernetes/charmed-k8s/docs/quickstart) +- [Juju documentation](https://juju.is/docs) +- [Canonical Kubernetes operations](https://ubuntu.com/kubernetes/docs) diff --git a/calico-enterprise_versioned_docs/version-3.21-2/getting-started/compatibility.mdx b/calico-enterprise_versioned_docs/version-3.21-2/getting-started/compatibility.mdx index 6bcee27a55..1ab07ad08d 100644 --- a/calico-enterprise_versioned_docs/version-3.21-2/getting-started/compatibility.mdx +++ b/calico-enterprise_versioned_docs/version-3.21-2/getting-started/compatibility.mdx @@ -18,6 +18,7 @@ The following list shows the platforms supported in this release. If you're work - [RKE](#rke) - [RKE2](#rke2) - [TKG](#tkg) +- [Charmed Kubernetes](#charmed-kubernetes) ### Supported $[prodname] features @@ -105,6 +106,14 @@ Kubernetes version support aligns with [upstream Kubernetes](#kubernetes-kubeadm | 3.20 | 2.4 | $[prodname] CNI with network policy | 1.27 | | 3.19 | 2.4 | $[prodname] CNI with network policy | 1.27 | +## Charmed Kubernetes + +Kubernetes version support aligns with [upstream Kubernetes](#kubernetes-kubeadm) to the latest version if available. + +| $[prodname] version | $[prodname] support | +| ----------------------- | ----------------------------------------------------------------------------------------- | +| 3.20 to current release | - $[prodname] CNI with network policy | + ## Supported browsers The following list shows the browsers supported by $[prodname] in this release. diff --git a/calico-enterprise_versioned_docs/version-3.21-2/getting-started/index.mdx b/calico-enterprise_versioned_docs/version-3.21-2/getting-started/index.mdx index 8be62fd8b1..9da4c78087 100644 --- a/calico-enterprise_versioned_docs/version-3.21-2/getting-started/index.mdx +++ b/calico-enterprise_versioned_docs/version-3.21-2/getting-started/index.mdx @@ -24,6 +24,7 @@ Requirements and guides for installing Calico Enterprise on Kubernetes clusters + diff --git a/calico-enterprise_versioned_docs/version-3.21-2/getting-started/install-on-clusters/charmed-k8s.mdx b/calico-enterprise_versioned_docs/version-3.21-2/getting-started/install-on-clusters/charmed-k8s.mdx new file mode 100644 index 0000000000..21ad81f1a7 --- /dev/null +++ b/calico-enterprise_versioned_docs/version-3.21-2/getting-started/install-on-clusters/charmed-k8s.mdx @@ -0,0 +1,383 @@ +--- +description: Install Calico Enterprise on a Charmed Kubernetes cluster. +title: Charmed Kubernetes +--- + +import InstallGeneric from '@site/calico-enterprise_versioned_docs/version-3.21-2/_includes/components/InstallGeneric'; +import Admonition from '@theme/Admonition'; + +# Install $[prodname] on a Charmed Kubernetes cluster + +This guide describes how to install $[prodname] on a Charmed Kubernetes cluster. + +## Before you begin + +**CNI support** + +- Calico CNI for networking with $[prodname] network policy + + The geeky details of what you get by default: + + + +**Required** + +- Your cluster meets the [system requirements](requirements.mdx) +- A [compatible Charmed Kubernetes cluster](../compatibility.mdx#charmed-kubernetes) +- A [compatible Charmed Kubernetes bundle](https://github.com/charmed-kubernetes/bundle/tree/main/releases) configured without a CNI +- A [Tigera license key and credentials](calico-enterprise.mdx) +- [Install kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) on your workstation +- [Install juju](https://juju.is/docs/juju/install-juju) on your workstation (if managing the cluster directly) + +## Prepare a compatible cluster for $[prodname] using a modified bundle file + +For the best results, you should create a new Charmed Kubernetes cluster without a CNI, and then install $[prodname] on that cluster. +This ensures proper configuration and compatibility for a smooth installation process. + +By default, Charmed Kubernetes clusters include a managed version of Calico Open Source. +Migrating from this managed version of Calico Open Source to Calico Enterprise is not supported. + +To create a Charmed Kubernetes cluster without a CNI, you can customize your deployment by using a bundle overlay file. +See the [Charmed Kubernetes documentation](https://ubuntu.com/kubernetes/charmed-k8s/docs/install-manual#editing-a-bundle) for more information on this installation method. + +1. Copy one of the default bundle files located in [Charmed Kubernetes Github Releases](https://github.com/charmed-kubernetes/bundle/tree/main/releases). + + For example, to get the default bundle for the v1.33 charmed kubernetes release: + + ```bash + curl -o charmed-kubernetes-bundle.yaml -L https://raw.githubusercontent.com/charmed-kubernetes/bundle/refs/heads/main/releases/1.33/bundle.yaml + ``` + +
+ + Example of default Charmed Kubernetes bundle file + + An example of a default bundle file with the `calico` charm: + ```yaml + description: A highly-available, production-grade Kubernetes cluster. + docs: https://discourse.charmhub.io/t/charmed-kubernetes-bundle/14447 + issues: https://bugs.launchpad.net/charmed-kubernetes-bundles + series: noble + source: https://github.com/charmed-kubernetes/bundle + website: https://ubuntu.com/kubernetes/charmed-k8s + name: charmed-kubernetes + applications: + // highlight-start + calico: + annotations: + gui-x: '475' + gui-y: '605' + channel: 1.33/stable + charm: calico + options: + vxlan: Always + // highlight-end + containerd: + annotations: + gui-x: '475' + gui-y: '800' + channel: 1.33/stable + charm: containerd + easyrsa: + annotations: + gui-x: '90' + gui-y: '420' + channel: 1.33/stable + charm: easyrsa + constraints: cores=1 mem=4G root-disk=16G + num_units: 1 + etcd: + annotations: + gui-x: '800' + gui-y: '420' + channel: 1.33/stable + charm: etcd + constraints: cores=2 mem=8G root-disk=16G + num_units: 3 + options: + channel: 3.4/stable + kubeapi-load-balancer: + annotations: + gui-x: '450' + gui-y: '250' + channel: 1.33/stable + charm: kubeapi-load-balancer + constraints: cores=1 mem=4G root-disk=16G + expose: true + num_units: 1 + kubernetes-control-plane: + annotations: + gui-x: '800' + gui-y: '850' + channel: 1.33/stable + charm: kubernetes-control-plane + constraints: cores=2 mem=8G root-disk=16G + num_units: 2 + options: + channel: 1.33/stable + kubernetes-worker: + annotations: + gui-x: '90' + gui-y: '850' + channel: 1.33/stable + charm: kubernetes-worker + constraints: cores=2 mem=8G root-disk=16G + expose: true + num_units: 3 + options: + channel: 1.33/stable + relations: + - - kubernetes-control-plane:loadbalancer-external + - kubeapi-load-balancer:lb-consumers + - - kubernetes-control-plane:loadbalancer-internal + - kubeapi-load-balancer:lb-consumers + - - kubernetes-control-plane:kube-control + - kubernetes-worker:kube-control + - - kubernetes-control-plane:certificates + - easyrsa:client + - - etcd:certificates + - easyrsa:client + - - kubernetes-control-plane:etcd + - etcd:db + - - kubernetes-worker:certificates + - easyrsa:client + - - kubeapi-load-balancer:certificates + - easyrsa:client + // highlight-start + - - calico:etcd + - etcd:db + - - calico:cni + - kubernetes-control-plane:cni + - - calico:cni + - kubernetes-worker:cni + // highlight-end + - - containerd:containerd + - kubernetes-worker:container-runtime + - - containerd:containerd + - kubernetes-control-plane:container-runtime + ``` + +
+ +1. Remove all references to the `calico` charm from the bundle file: + + 1. Remove the calico application from the `applications` section. + ```yaml title="Default text to be removed" + calico: + annotations: + gui-x: '475' + gui-y: '605' + channel: 1.33/stable + charm: calico + options: + vxlan: Always + ``` + 1. Remove all calico relations from the `relations` section. + ```yaml title="Default text to be removed" + - - calico:etcd + - etcd:db + - - calico:cni + - kubernetes-control-plane:cni + - - calico:cni + - kubernetes-worker:cni + ``` + + Your default bundle file should now look like this: + +
+ + Example of modified Charmed Kubernetes bundle (no CNI) + + An example of a default bundle file with the `calico` charm: + ```yaml + description: A highly-available, production-grade Kubernetes cluster. + docs: https://discourse.charmhub.io/t/charmed-kubernetes-bundle/14447 + issues: https://bugs.launchpad.net/charmed-kubernetes-bundles + series: noble + source: https://github.com/charmed-kubernetes/bundle + website: https://ubuntu.com/kubernetes/charmed-k8s + name: charmed-kubernetes + applications: + containerd: + annotations: + gui-x: '475' + gui-y: '800' + channel: 1.33/stable + charm: containerd + easyrsa: + annotations: + gui-x: '90' + gui-y: '420' + channel: 1.33/stable + charm: easyrsa + constraints: cores=1 mem=4G root-disk=16G + num_units: 1 + etcd: + annotations: + gui-x: '800' + gui-y: '420' + channel: 1.33/stable + charm: etcd + constraints: cores=2 mem=8G root-disk=16G + num_units: 3 + options: + channel: 3.4/stable + kubeapi-load-balancer: + annotations: + gui-x: '450' + gui-y: '250' + channel: 1.33/stable + charm: kubeapi-load-balancer + constraints: cores=1 mem=4G root-disk=16G + expose: true + num_units: 1 + kubernetes-control-plane: + annotations: + gui-x: '800' + gui-y: '850' + channel: 1.33/stable + charm: kubernetes-control-plane + constraints: cores=2 mem=8G root-disk=16G + num_units: 2 + options: + channel: 1.33/stable + kubernetes-worker: + annotations: + gui-x: '90' + gui-y: '850' + channel: 1.33/stable + charm: kubernetes-worker + constraints: cores=2 mem=8G root-disk=16G + expose: true + num_units: 3 + options: + channel: 1.33/stable + relations: + - - kubernetes-control-plane:loadbalancer-external + - kubeapi-load-balancer:lb-consumers + - - kubernetes-control-plane:loadbalancer-internal + - kubeapi-load-balancer:lb-consumers + - - kubernetes-control-plane:kube-control + - kubernetes-worker:kube-control + - - kubernetes-control-plane:certificates + - easyrsa:client + - - etcd:certificates + - easyrsa:client + - - kubernetes-control-plane:etcd + - etcd:db + - - kubernetes-worker:certificates + - easyrsa:client + - - kubeapi-load-balancer:certificates + - easyrsa:client + - - calico:etcd + - etcd:db + - - containerd:containerd + - kubernetes-worker:container-runtime + - - containerd:containerd + - kubernetes-control-plane:container-runtime + ``` +
+ +## Set up Juju and deploy a cluster without a CNI + +1. Configure juju with a default credential by adding a new credential or using an existing credential: + ``` + juju add-credential + ``` + +1. Create the controller with a unique name and use the credential created in Step 1: + ``` + juju bootstrap --credential + ``` + +1. Create the model with a unique name: + ``` + juju add-model + ``` + +1. Create the Charmed Kubernetes cluster by specifying the modified bundle file:: + ``` + juju deploy ./charmed-kubernetes-bundle.yaml + ``` + +1. If you notice that the `kubernetes-control-plane` and `kubernetes-worker` are in waiting status due to missing CNI, this can be prevented by setting `ignore-missing-cni=true` in the `kubernetes-control-plane` and `kubernetes-worker` charms by running: + ```bash + juju config kubernetes-control-plane ignore-missing-cni=true + juju config kubernetes-worker ignore-missing-cni=true + ``` + + :::note + The `ignore-missing-cni=true` configuration allows the `kubernetes-control-plane` and `kubernetes-worker` charms to be ready without waiting for a CNI plugin to be installed since $[prodname] will provide its own. + ::: + +1. To allow setup of the CNI to be taken care of by $[prodname], the `kubernetes-control-plane` charm also needs to allow privileged pods by running: + ```bash + juju config kubernetes-control-plane allow-privileged=true + ``` + + :::note + The `allow-privileged=true` configuration enables privileged containers which are required to let $[prodname] setup the CNI by deploying its own calico-node daemonset. + ::: + +1. Ensure the applications and units are active in the model by running: + ```bash + juju status + ``` + The charmed kubernetes cluster should be healthy within an hour. + + :::note + It is expected that the `kubernetes-control-plane` application should be in waiting status because it is waiting for kube-system pods to start. All other statuses should be active before proceeding to install $[prodname]. Example status: + ``` + App Version Status Scale Charm Channel Rev Exposed Message + containerd 1.6.38 active 5 containerd 1.33/stable 90 no Container runtime available + easyrsa v3.0.9 active 1 easyrsa 1.33/stable 74 no Certificate Authority connected. + etcd 3.4.37 active 3 etcd 1.33/stable 788 no Healthy with 3 known peers + kubeapi-load-balancer 1.18.0 active 1 kubeapi-load-balancer 1.33/stable 196 yes Ready + kubernetes-control-plane 1.33.x waiting 2 kubernetes-control-plane 1.33/stable 652 no Waiting for 3 kube-system pods to start + kubernetes-worker 1.33.x active 3 kubernetes-worker 1.33/stable 369 yes Ready + ``` + ::: + +1. Ensure the Charmed Kubernetes model and its applications are stable by running: + ```bash + juju wait-for model --query='life=="alive" && status=="available"' + ``` + +1. Ensure the Charmed Kubernetes applications are stable by running: + ```bash + applications=("easyrsa" "containerd" "etcd" "kubernetes-worker" "kubeapi-load-balancer") + for i in "${!applications[@]}"; do + app="${applications[$i]}"; + juju wait-for application $app; + done + ``` + +1. Get the kubeconfig from the `kubernetes-control-plane` application by running: + ```bash + juju scp kubernetes-control-plane/0:config kubeconfig + ``` + +## Install $[prodname] + +:::caution +For Charmed Kubernetes clusters, you cannot use AWS EBS storage classes. You must configure an alternative storage solution such as local storage or another compatible storage provider. +::: + + + +## Next steps + +- [Configure access to the $[prodname] web console](../../operations/cnx/access-the-manager.mdx) +- [Get started with Kubernetes network policy](../../network-policy/get-started/kubernetes-network-policy.mdx) +- [Get started with $[prodname] network policy](../../network-policy/beginners/calico-network-policy.mdx) +- [Enable default deny for Kubernetes pods](../../network-policy/beginners/kubernetes-default-deny.mdx) + +**Additional resources** + +- [Charmed Kubernetes documentation](https://ubuntu.com/kubernetes/charmed-k8s/docs/install-manual) +- [Charmed Kubernetes quickstart](https://ubuntu.com/kubernetes/charmed-k8s/docs/quickstart) +- [Juju documentation](https://juju.is/docs) +- [Canonical Kubernetes operations](https://ubuntu.com/kubernetes/docs) diff --git a/calico-enterprise_versioned_docs/version-3.22-1/getting-started/compatibility.mdx b/calico-enterprise_versioned_docs/version-3.22-1/getting-started/compatibility.mdx index 40dc7ce671..07ac66b2dd 100644 --- a/calico-enterprise_versioned_docs/version-3.22-1/getting-started/compatibility.mdx +++ b/calico-enterprise_versioned_docs/version-3.22-1/getting-started/compatibility.mdx @@ -18,6 +18,7 @@ The following list shows the platforms supported in this release. If you're work - [RKE](#rke) - [RKE2](#rke2) - [TKG](#tkg) +- [Charmed Kubernetes](#charmed-kubernetes) ### Supported $[prodname] features @@ -112,6 +113,14 @@ Kubernetes version support aligns with [upstream Kubernetes](#kubernetes-kubeadm | 3.20 | 2.4 | $[prodname] CNI with network policy | 1.27 | | 3.19 | 2.4 | $[prodname] CNI with network policy | 1.27 | +## Charmed Kubernetes + +Kubernetes version support aligns with [upstream Kubernetes](#kubernetes-kubeadm) to the latest version if available. + +| $[prodname] version | $[prodname] support | +| ----------------------- | ----------------------------------------------------------------------------------------- | +| 3.20 to current release | - $[prodname] CNI with network policy | + ## Supported browsers The following list shows the browsers supported by $[prodname] in this release. diff --git a/calico-enterprise_versioned_docs/version-3.22-1/getting-started/index.mdx b/calico-enterprise_versioned_docs/version-3.22-1/getting-started/index.mdx index 8be62fd8b1..9da4c78087 100644 --- a/calico-enterprise_versioned_docs/version-3.22-1/getting-started/index.mdx +++ b/calico-enterprise_versioned_docs/version-3.22-1/getting-started/index.mdx @@ -24,6 +24,7 @@ Requirements and guides for installing Calico Enterprise on Kubernetes clusters + diff --git a/calico-enterprise_versioned_docs/version-3.22-1/getting-started/install-on-clusters/charmed-k8s.mdx b/calico-enterprise_versioned_docs/version-3.22-1/getting-started/install-on-clusters/charmed-k8s.mdx new file mode 100644 index 0000000000..b0289144c8 --- /dev/null +++ b/calico-enterprise_versioned_docs/version-3.22-1/getting-started/install-on-clusters/charmed-k8s.mdx @@ -0,0 +1,383 @@ +--- +description: Install Calico Enterprise on a Charmed Kubernetes cluster. +title: Charmed Kubernetes +--- + +import InstallGeneric from '@site/calico-enterprise_versioned_docs/version-3.22-1/_includes/components/InstallGeneric'; +import Admonition from '@theme/Admonition'; + +# Install $[prodname] on a Charmed Kubernetes cluster + +This guide describes how to install $[prodname] on a Charmed Kubernetes cluster. + +## Before you begin + +**CNI support** + +- Calico CNI for networking with $[prodname] network policy + + The geeky details of what you get by default: + + + +**Required** + +- Your cluster meets the [system requirements](requirements.mdx) +- A [compatible Charmed Kubernetes cluster](../compatibility.mdx#charmed-kubernetes) +- A [compatible Charmed Kubernetes bundle](https://github.com/charmed-kubernetes/bundle/tree/main/releases) configured without a CNI +- A [Tigera license key and credentials](calico-enterprise.mdx) +- [Install kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) on your workstation +- [Install juju](https://juju.is/docs/juju/install-juju) on your workstation (if managing the cluster directly) + +## Prepare a compatible cluster for $[prodname] using a modified bundle file + +For the best results, you should create a new Charmed Kubernetes cluster without a CNI, and then install $[prodname] on that cluster. +This ensures proper configuration and compatibility for a smooth installation process. + +By default, Charmed Kubernetes clusters include a managed version of Calico Open Source. +Migrating from this managed version of Calico Open Source to Calico Enterprise is not supported. + +To create a Charmed Kubernetes cluster without a CNI, you can customize your deployment by using a bundle overlay file. +See the [Charmed Kubernetes documentation](https://ubuntu.com/kubernetes/charmed-k8s/docs/install-manual#editing-a-bundle) for more information on this installation method. + +1. Copy one of the default bundle files located in [Charmed Kubernetes Github Releases](https://github.com/charmed-kubernetes/bundle/tree/main/releases). + + For example, to get the default bundle for the v1.33 charmed kubernetes release: + + ```bash + curl -o charmed-kubernetes-bundle.yaml -L https://raw.githubusercontent.com/charmed-kubernetes/bundle/refs/heads/main/releases/1.33/bundle.yaml + ``` + +
+ + Example of default Charmed Kubernetes bundle file + + An example of a default bundle file with the `calico` charm: + ```yaml + description: A highly-available, production-grade Kubernetes cluster. + docs: https://discourse.charmhub.io/t/charmed-kubernetes-bundle/14447 + issues: https://bugs.launchpad.net/charmed-kubernetes-bundles + series: noble + source: https://github.com/charmed-kubernetes/bundle + website: https://ubuntu.com/kubernetes/charmed-k8s + name: charmed-kubernetes + applications: + // highlight-start + calico: + annotations: + gui-x: '475' + gui-y: '605' + channel: 1.33/stable + charm: calico + options: + vxlan: Always + // highlight-end + containerd: + annotations: + gui-x: '475' + gui-y: '800' + channel: 1.33/stable + charm: containerd + easyrsa: + annotations: + gui-x: '90' + gui-y: '420' + channel: 1.33/stable + charm: easyrsa + constraints: cores=1 mem=4G root-disk=16G + num_units: 1 + etcd: + annotations: + gui-x: '800' + gui-y: '420' + channel: 1.33/stable + charm: etcd + constraints: cores=2 mem=8G root-disk=16G + num_units: 3 + options: + channel: 3.4/stable + kubeapi-load-balancer: + annotations: + gui-x: '450' + gui-y: '250' + channel: 1.33/stable + charm: kubeapi-load-balancer + constraints: cores=1 mem=4G root-disk=16G + expose: true + num_units: 1 + kubernetes-control-plane: + annotations: + gui-x: '800' + gui-y: '850' + channel: 1.33/stable + charm: kubernetes-control-plane + constraints: cores=2 mem=8G root-disk=16G + num_units: 2 + options: + channel: 1.33/stable + kubernetes-worker: + annotations: + gui-x: '90' + gui-y: '850' + channel: 1.33/stable + charm: kubernetes-worker + constraints: cores=2 mem=8G root-disk=16G + expose: true + num_units: 3 + options: + channel: 1.33/stable + relations: + - - kubernetes-control-plane:loadbalancer-external + - kubeapi-load-balancer:lb-consumers + - - kubernetes-control-plane:loadbalancer-internal + - kubeapi-load-balancer:lb-consumers + - - kubernetes-control-plane:kube-control + - kubernetes-worker:kube-control + - - kubernetes-control-plane:certificates + - easyrsa:client + - - etcd:certificates + - easyrsa:client + - - kubernetes-control-plane:etcd + - etcd:db + - - kubernetes-worker:certificates + - easyrsa:client + - - kubeapi-load-balancer:certificates + - easyrsa:client + // highlight-start + - - calico:etcd + - etcd:db + - - calico:cni + - kubernetes-control-plane:cni + - - calico:cni + - kubernetes-worker:cni + // highlight-end + - - containerd:containerd + - kubernetes-worker:container-runtime + - - containerd:containerd + - kubernetes-control-plane:container-runtime + ``` + +
+ +1. Remove all references to the `calico` charm from the bundle file: + + 1. Remove the calico application from the `applications` section. + ```yaml title="Default text to be removed" + calico: + annotations: + gui-x: '475' + gui-y: '605' + channel: 1.33/stable + charm: calico + options: + vxlan: Always + ``` + 1. Remove all calico relations from the `relations` section. + ```yaml title="Default text to be removed" + - - calico:etcd + - etcd:db + - - calico:cni + - kubernetes-control-plane:cni + - - calico:cni + - kubernetes-worker:cni + ``` + + Your default bundle file should now look like this: + +
+ + Example of modified Charmed Kubernetes bundle (no CNI) + + An example of a default bundle file with the `calico` charm: + ```yaml + description: A highly-available, production-grade Kubernetes cluster. + docs: https://discourse.charmhub.io/t/charmed-kubernetes-bundle/14447 + issues: https://bugs.launchpad.net/charmed-kubernetes-bundles + series: noble + source: https://github.com/charmed-kubernetes/bundle + website: https://ubuntu.com/kubernetes/charmed-k8s + name: charmed-kubernetes + applications: + containerd: + annotations: + gui-x: '475' + gui-y: '800' + channel: 1.33/stable + charm: containerd + easyrsa: + annotations: + gui-x: '90' + gui-y: '420' + channel: 1.33/stable + charm: easyrsa + constraints: cores=1 mem=4G root-disk=16G + num_units: 1 + etcd: + annotations: + gui-x: '800' + gui-y: '420' + channel: 1.33/stable + charm: etcd + constraints: cores=2 mem=8G root-disk=16G + num_units: 3 + options: + channel: 3.4/stable + kubeapi-load-balancer: + annotations: + gui-x: '450' + gui-y: '250' + channel: 1.33/stable + charm: kubeapi-load-balancer + constraints: cores=1 mem=4G root-disk=16G + expose: true + num_units: 1 + kubernetes-control-plane: + annotations: + gui-x: '800' + gui-y: '850' + channel: 1.33/stable + charm: kubernetes-control-plane + constraints: cores=2 mem=8G root-disk=16G + num_units: 2 + options: + channel: 1.33/stable + kubernetes-worker: + annotations: + gui-x: '90' + gui-y: '850' + channel: 1.33/stable + charm: kubernetes-worker + constraints: cores=2 mem=8G root-disk=16G + expose: true + num_units: 3 + options: + channel: 1.33/stable + relations: + - - kubernetes-control-plane:loadbalancer-external + - kubeapi-load-balancer:lb-consumers + - - kubernetes-control-plane:loadbalancer-internal + - kubeapi-load-balancer:lb-consumers + - - kubernetes-control-plane:kube-control + - kubernetes-worker:kube-control + - - kubernetes-control-plane:certificates + - easyrsa:client + - - etcd:certificates + - easyrsa:client + - - kubernetes-control-plane:etcd + - etcd:db + - - kubernetes-worker:certificates + - easyrsa:client + - - kubeapi-load-balancer:certificates + - easyrsa:client + - - calico:etcd + - etcd:db + - - containerd:containerd + - kubernetes-worker:container-runtime + - - containerd:containerd + - kubernetes-control-plane:container-runtime + ``` +
+ +## Set up Juju and deploy a cluster without a CNI + +1. Configure juju with a default credential by adding a new credential or using an existing credential: + ``` + juju add-credential + ``` + +1. Create the controller with a unique name and use the credential created in Step 1: + ``` + juju bootstrap --credential + ``` + +1. Create the model with a unique name: + ``` + juju add-model + ``` + +1. Create the Charmed Kubernetes cluster by specifying the modified bundle file:: + ``` + juju deploy ./charmed-kubernetes-bundle.yaml + ``` + +1. If you notice that the `kubernetes-control-plane` and `kubernetes-worker` are in waiting status due to missing CNI, this can be prevented by setting `ignore-missing-cni=true` in the `kubernetes-control-plane` and `kubernetes-worker` charms by running: + ```bash + juju config kubernetes-control-plane ignore-missing-cni=true + juju config kubernetes-worker ignore-missing-cni=true + ``` + + :::note + The `ignore-missing-cni=true` configuration allows the `kubernetes-control-plane` and `kubernetes-worker` charms to be ready without waiting for a CNI plugin to be installed since $[prodname] will provide its own. + ::: + +1. To allow setup of the CNI to be taken care of by $[prodname], the `kubernetes-control-plane` charm also needs to allow privileged pods by running: + ```bash + juju config kubernetes-control-plane allow-privileged=true + ``` + + :::note + The `allow-privileged=true` configuration enables privileged containers which are required to let $[prodname] setup the CNI by deploying its own calico-node daemonset. + ::: + +1. Ensure the applications and units are active in the model by running: + ```bash + juju status + ``` + The charmed kubernetes cluster should be healthy within an hour. + + :::note + It is expected that the `kubernetes-control-plane` application should be in waiting status because it is waiting for kube-system pods to start. All other statuses should be active before proceeding to install $[prodname]. Example status: + ``` + App Version Status Scale Charm Channel Rev Exposed Message + containerd 1.6.38 active 5 containerd 1.33/stable 90 no Container runtime available + easyrsa v3.0.9 active 1 easyrsa 1.33/stable 74 no Certificate Authority connected. + etcd 3.4.37 active 3 etcd 1.33/stable 788 no Healthy with 3 known peers + kubeapi-load-balancer 1.18.0 active 1 kubeapi-load-balancer 1.33/stable 196 yes Ready + kubernetes-control-plane 1.33.x waiting 2 kubernetes-control-plane 1.33/stable 652 no Waiting for 3 kube-system pods to start + kubernetes-worker 1.33.x active 3 kubernetes-worker 1.33/stable 369 yes Ready + ``` + ::: + +1. Ensure the Charmed Kubernetes model and its applications are stable by running: + ```bash + juju wait-for model --query='life=="alive" && status=="available"' + ``` + +1. Ensure the Charmed Kubernetes applications are stable by running: + ```bash + applications=("easyrsa" "containerd" "etcd" "kubernetes-worker" "kubeapi-load-balancer") + for i in "${!applications[@]}"; do + app="${applications[$i]}"; + juju wait-for application $app; + done + ``` + +1. Get the kubeconfig from the `kubernetes-control-plane` application by running: + ```bash + juju scp kubernetes-control-plane/0:config kubeconfig + ``` + +## Install $[prodname] + +:::caution +For Charmed Kubernetes clusters, you cannot use AWS EBS storage classes. You must configure an alternative storage solution such as local storage or another compatible storage provider. +::: + + + +## Next steps + +- [Configure access to the $[prodname] web console](../../operations/cnx/access-the-manager.mdx) +- [Get started with Kubernetes network policy](../../network-policy/get-started/kubernetes-network-policy.mdx) +- [Get started with $[prodname] network policy](../../network-policy/beginners/calico-network-policy.mdx) +- [Enable default deny for Kubernetes pods](../../network-policy/beginners/kubernetes-default-deny.mdx) + +**Additional resources** + +- [Charmed Kubernetes documentation](https://ubuntu.com/kubernetes/charmed-k8s/docs/install-manual) +- [Charmed Kubernetes quickstart](https://ubuntu.com/kubernetes/charmed-k8s/docs/quickstart) +- [Juju documentation](https://juju.is/docs) +- [Canonical Kubernetes operations](https://ubuntu.com/kubernetes/docs) diff --git a/calico-enterprise_versioned_sidebars/version-3.20-2-sidebars.json b/calico-enterprise_versioned_sidebars/version-3.20-2-sidebars.json index cea7dcbbc4..a59ed81a8c 100644 --- a/calico-enterprise_versioned_sidebars/version-3.20-2-sidebars.json +++ b/calico-enterprise_versioned_sidebars/version-3.20-2-sidebars.json @@ -64,6 +64,7 @@ "getting-started/install-on-clusters/rke2", "getting-started/install-on-clusters/rancher-ui", "getting-started/install-on-clusters/tkg", + "getting-started/install-on-clusters/charmed-k8s", { "type": "category", "label": "Calico Enterprise for Windows", diff --git a/calico-enterprise_versioned_sidebars/version-3.21-2-sidebars.json b/calico-enterprise_versioned_sidebars/version-3.21-2-sidebars.json index 024490ba38..6e2dc4773e 100644 --- a/calico-enterprise_versioned_sidebars/version-3.21-2-sidebars.json +++ b/calico-enterprise_versioned_sidebars/version-3.21-2-sidebars.json @@ -65,6 +65,7 @@ "getting-started/install-on-clusters/rke2", "getting-started/install-on-clusters/rancher-ui", "getting-started/install-on-clusters/tkg", + "getting-started/install-on-clusters/charmed-k8s", { "type": "category", "label": "Calico Enterprise for Windows", diff --git a/calico-enterprise_versioned_sidebars/version-3.22-1-sidebars.json b/calico-enterprise_versioned_sidebars/version-3.22-1-sidebars.json index 024490ba38..6e2dc4773e 100644 --- a/calico-enterprise_versioned_sidebars/version-3.22-1-sidebars.json +++ b/calico-enterprise_versioned_sidebars/version-3.22-1-sidebars.json @@ -65,6 +65,7 @@ "getting-started/install-on-clusters/rke2", "getting-started/install-on-clusters/rancher-ui", "getting-started/install-on-clusters/tkg", + "getting-started/install-on-clusters/charmed-k8s", { "type": "category", "label": "Calico Enterprise for Windows", diff --git a/sidebars-calico-enterprise.js b/sidebars-calico-enterprise.js index 7114223089..ae795d99f5 100644 --- a/sidebars-calico-enterprise.js +++ b/sidebars-calico-enterprise.js @@ -53,6 +53,7 @@ module.exports = { 'getting-started/install-on-clusters/rke2', 'getting-started/install-on-clusters/rancher-ui', 'getting-started/install-on-clusters/tkg', + 'getting-started/install-on-clusters/charmed-k8s', { type: 'category', label: 'Calico Enterprise for Windows',