Skip to content

Commit 9a02aa3

Browse files
Merge pull request #591 from kiranchavala/calico-cks-doc
added calico cni docs
2 parents d6e93e7 + 532b51e commit 9a02aa3

File tree

1 file changed

+50
-21
lines changed

1 file changed

+50
-21
lines changed

source/plugins/cloudstack-kubernetes-service.rst

Lines changed: 50 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@
1313
CloudStack Kubernetes Service
1414
==============================
1515

16-
The Kubernetes Service plugin adds Kubernetes integration to CloudStack. The plugin is disabled by default and an admin can enable it using a Global Setting. It enables users to run containerized services using Kubernetes clusters.
16+
The Kubernetes Service plugin adds Kubernetes integration to CloudStack. The plugin is disabled by default and an admin can enable it using a Global Setting. It enables users to run containerized services using Kubernetes clusters. Also the global setting "endpoint.url" needs to be set to the CloudStack management server ip example (http://management-server-ip:8080/client/api)
1717

18-
With CoreOS having reached EOL, from 4.16 on the Kubernetes Service Plugin will use
19-
the existing SystemVM Template by default for deploying kubernetes clusters. For
18+
The Kubernetes Service plugin will use the existing SystemVM Template by default for deploying Kubernetes clusters. For
2019
installation of Kubernetes binaries on the cluster nodes, a binaries ISO is used for each
2120
Kubernetes version to be made available via CloudStack. This allows faster, offline
2221
installation of Kubernetes binaries and docker images along with support for adding
@@ -26,7 +25,9 @@ multiple versions of Kubernetes for upgrades and running different clusters.
2625
From version 4.21.0, users can choose different templates and service offerings for different types of nodes (worker, control, etcd nodes) for deploying Kubernetes clusters. The templates must be previously registered selecting the 'For CKS' option.
2726
See :ref:`flexible-kubernetes-clusters`.
2827

29-
For deployment and setup of Kubernetes on cluster nodes, the plugin uses the Kubernetes tool, 'kubeadm'. kubeadm is the command-line tool for easily provisioning a secure Kubernetes cluster on top of physical or cloud servers or Instances. Under the hood, control node(s) of the cluster starts a Kubernetes cluster using kubeadm init command with a custom token, and worker nodes join this Kubernetes cluster using kubeadm join command with the same token. More about kubeadm here: https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm/. Weave Net CNI provider plugin is used for cluster networking. More about Weave Net provide plugin here: https://www.weave.works/docs/net/latest/kubernetes/kube-addon/.
28+
For deployment and setup of Kubernetes on cluster nodes, the plugin uses the Kubernetes tool, 'kubeadm'. kubeadm is the command-line tool for easily provisioning a secure Kubernetes cluster on top of physical or cloud servers or Instances. Under the hood, control node(s) of the cluster starts a Kubernetes cluster using kubeadm init command with a custom token, and worker nodes join this Kubernetes cluster using kubeadm join command with the same token. More about kubeadm here: https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm/.
29+
30+
Calico CNI provider plugin is used for cluster networking supported from ACS 4.21 onwards. More about Calico CNI plugin here: https://docs.projectcalico.org/getting-started/kubernetes/.
3031

3132
To access the Kubernetes dashboard securely, the plugin provides access to kubeconfig file data which uses the Kubernetes tool kubectl to run a local proxy and thereby access the dashboard. More about kubectl here: https://kubernetes.io/docs/reference/kubectl/overview/
3233

@@ -72,26 +73,31 @@ Eg: To generate the latest kubernetes iso
7273

7374
.. parsed-literal::
7475
75-
1.27.2, kubernetes version, see https://github.com/kubernetes/kubernetes/releases
76-
1.3.0, CNI version, see https://github.com/containernetworking/plugins/releases
77-
1.27.0, cri-tools version, see https://github.com/kubernetes-sigs/cri-tools/releases
78-
1.11, weave addon for kubernetes, see https://github.com/weaveworks/weave/tree/master/prog/weave-kube
76+
1.33.1, kubernetes version, see https://github.com/kubernetes/kubernetes/releases
77+
1.7.1, CNI version, see https://github.com/containernetworking/plugins/releases
78+
1.33.0, cri-tools version, see https://github.com/kubernetes-sigs/cri-tools/releases
79+
3.30.0, calico addon for kubernetes, see https://raw.githubusercontent.com/projectcalico/calico/v3.30.0/manifests/calico.yaml
7980
2.7.0, kubernetes dashboard version, see https://github.com/kubernetes/dashboard/release
8081
8182
Usage:
8283

8384
.. parsed-literal::
8485
85-
# ./create-kubernetes-binaries-iso.sh OUTPUT_PATH KUBERNETES_VERSION CNI_VERSION CRICTL_VERSION WEAVENET_NETWORK_YAML_CONFIG DASHBOARD_YAML_CONFIG [OPTIONAL_OUTPUT_FILENAME] [OPTIONAL_ETCD_VERSION]
86+
# ./create-kubernetes-binaries-iso.sh OUTPUT_PATH KUBERNETES_VERSION CNI_VERSION CRICTL_VERSION CALICO_NETWORK_YAML_CONFIG DASHBOARD_YAML_CONFIG [OPTIONAL_OUTPUT_FILENAME] [OPTIONAL_ETCD_VERSION]
87+
8688
87-
Eg:
89+
90+
Eg: To generate the kubernetes iso with calico cni plugin
8891

8992
.. parsed-literal::
93+
94+
# ./create-kubernetes-binaries-iso.sh ./ 1.33.1 1.7.1 1.33.0 https://raw.githubusercontent.com/projectcalico/calico/v3.30.0/manifests/calico.yaml https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml setup-v1.33.1-calico
9095
91-
# ./create-kubernetes-binaries-iso.sh ./ 1.27.2 1.3.0 1.27.0 https://raw.githubusercontent.com/weaveworks/weave/master/prog/weave-kube/weave-daemonset-k8s-1.11.yaml https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml setup-v1.27.2
96+
Eg: To generate the kubernetes iso with calico cni plugin for ARM64 architecture add aarch64 as the last parameter.
9297

93-
**NOTE:**
94-
From ACS 4.16 onwards, Kubernetes versions >= 1.20.x are only supported (https://endoflife.date/kubernetes).
98+
.. parsed-literal::
99+
100+
# ./create-kubernetes-binaries-iso.sh ./ 1.33.1 1.7.1 1.33.0 https://raw.githubusercontent.com/projectcalico/calico/v3.30.0/manifests/calico.yaml https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml aarch64 setup-v1.33.1-calico-arm64
95101
96102
**NOTE:**
97103
From ACS 4.21 onwards, it is possible to specify the version for etcd binaries in the create-kubernetes-binaries-iso.sh script as an optional parameter - ETCD_VERSION. When the ETCD_VERSION parameter is set, the specified etcd version binaries are downloaded and stored in the Kubernetes ISO.
@@ -100,7 +106,7 @@ Example for etcd version 3.5.1:
100106

101107
.. parsed-literal::
102108
103-
# ./create-kubernetes-binaries-iso.sh ./ 1.27.2 1.3.0 1.27.0 https://raw.githubusercontent.com/weaveworks/weave/master/prog/weave-kube/weave-daemonset-k8s-1.11.yaml https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml setup-v1.27.2 3.5.1
109+
# ./create-kubernetes-binaries-iso.sh ./ 1.33.1 1.7.1 1.33.0 https://raw.githubusercontent.com/projectcalico/calico/v3.30.0/manifests/calico.yaml https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml setup-v1.33.1-calico-etcd 3.5.1
104110
105111
To deploy Kubernetes clusters with
106112
Kubernetes ISOs built with a specified etcd version are necessary for creating Kubernetes clusters with separate etcd nodes. See :ref:`flexible-kubernetes-clusters`.
@@ -131,15 +137,15 @@ addKubernetesSupportedVersion API can be used by an admin to add a new supported
131137
For example:
132138

133139
.. parsed-literal::
134-
> add kubernetessupportedversion name=v1.13.2 semanticversion=1.13.2 url=http://172.20.0.1/files/setup-1.13.2.iso zoneid=34d23dd5-5ced-4e8b-9b0a-835a0b8ae2a6 mincpunumber=2 minmemory=2048
140+
> add kubernetessupportedversion name=v1.33.1 semanticversion=1.33.1 url=http://172.20.0.1/files/setup-1.33.1.iso zoneid=34d23dd5-5ced-4e8b-9b0a-835a0b8ae2a6 mincpunumber=2 minmemory=2048
135141
{
136142
"kubernetessupportedversion": {
137143
"id": "6668e999-fe6c-4a91-88d8-d10bcf280d02",
138144
"isoid": "78d45e9b-a482-46f4-8cbc-cf7964564b85",
139-
"isoname": "v1.13.2-Kubernetes-Binaries-ISO",
145+
"isoname": "v1.33.1-Kubernetes-Binaries-ISO",
140146
"isostate": "Active",
141-
"semanticversion": "1.13.2",
142-
"name": "v1.13.2",
147+
"semanticversion": "1.33.1",
148+
"name": "v1.33.1",
143149
"supportsha": false,
144150
"zoneid": "34d23dd5-5ced-4e8b-9b0a-835a0b8ae2a6",
145151
"zonename": "KVM-advzone1"
@@ -148,7 +154,7 @@ For example:
148154
}
149155
}
150156
151-
The minimum Kubernetes version that can be added in the service is 1.11. At present, v1.17 and above might not work due to their incompatibility with weave-net plugin.
157+
152158
153159
Listing supported Kubernetes versions
154160
######################################
@@ -273,7 +279,7 @@ For example:
273279
"endpoint": "https://172.20.20.12:6443/",
274280
"id": "74e3cc02-bbf7-438f-bfb0-9c193e90c1fb",
275281
"kubernetesversionid": "6668e999-fe6c-4a91-88d8-d10bcf280d02",
276-
"kubernetesversionname": "v1.13.2",
282+
"kubernetesversionname": "v1.33.1",
277283
"controlnodes": 1,
278284
"memory": "4096",
279285
"name": "Test",
@@ -765,6 +771,29 @@ For verification of the applied CNI Configuration, the following commands can be
765771
766772
Events: <none>
767773
774+
There could be Calico routing edge case encountered in some environments. By default, Calico uses the 192.168.0.0/16 network for its pod IP pool when you install it with the standard manifests. To avoid potential routing conflicts with existing networks in your infrastructure, it's advisable to customize the Calico IP pool to use a different subnet that doesn't overlap with your current network setup.
775+
776+
kubectl get ippool.crd.projectcalico.org -o yaml
777+
778+
.. code-block:: bash
779+
apiVersion: crd.projectcalico.org/v1
780+
kind: IPPool
781+
metadata:
782+
name: default-ipv4-ippool
783+
spec:
784+
cidr: 192.168.0.0/16
785+
ipipMode: Always
786+
natOutgoing: true
787+
disabled: false
788+
789+
You can edit the IP pool to change the CIDR to a different subnet that fits your network architecture better. For example, you might choose to use 10.0.0.0/16.
790+
791+
kubectl edit ippool default-ipv4-ippool
792+
793+
and redeploy the pods
794+
795+
kubectl delete pod --all -A
796+
768797
769798
.. |cks-add-version-form.png| image:: /_static/images/cks-add-version-form.png
770799
:alt: Add Kubernetes Supported Version form.
@@ -803,4 +832,4 @@ For verification of the applied CNI Configuration, the following commands can be
803832
.. |cks-cni-configuration-cluster-creation.png| image:: /_static/images/cks-cni-configuration-cluster-creation.png
804833
:alt: Kubernetes cluster creation setting a CNI configuration.
805834
.. |cks-cni-configuration-registration-sample.png| image:: /_static/images/cks-cni-configuration-registration-sample.png
806-
:alt: CNI Configuration registration sample.
835+
:alt: CNI Configuration registration sample.

0 commit comments

Comments
 (0)