Skip to content

Commit be8cb1b

Browse files
author
Pearl Dsilva
committed
Add details for CoreOS replacement with Debian (SystemVM template)
1 parent a27b9ec commit be8cb1b

File tree

1 file changed

+24
-44
lines changed

1 file changed

+24
-44
lines changed

source/plugins/cloudstack-kubernetes-service.rst

Lines changed: 24 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ CloudStack Kubernetes Service
1515

1616
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.
1717

18-
Kubernetes Service plugin uses a CoreOS based template for node VMs for the Kubernetes cluster. CoreOS has been used as it provides docker installation and networking rules needed for Kubernetes by default. In future, different guest OSes might be used. For installation of Kubernetes binaries on cluster nodes, a binaries ISO is used for each Kubernetes version to be made available via CloudStack. This allows faster, offline installation of Kubernetes binaries and docker images along with support for adding multiple versions of Kubernetes for upgrades and running different clusters.
18+
With CoreOS having reached EOL, from 4.16 the Kubernetes Service Plugin will use the existing SystemVM template for deploying kubernetes clusters. For installation of Kubernetes binaries on the cluster nodes, a binaries ISO is used for each Kubernetes version to be made available via CloudStack. This allows faster, offline installation of Kubernetes binaries and docker images along with support for adding multiple versions of Kubernetes for upgrades and running different clusters.
1919

2020
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 virtual machines. Under the hood, master 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/.
2121

2222
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/
2323

24-
The service allows creation of Kubernetes clusters using the UI or API. Both UI and API provide the ability to list, delete, scale upgrade, stop and start these clusters.
24+
The service allows creation of Kubernetes clusters using the UI or API. Both UI and API provide the ability to list, delete, scale, upgrade, stop and start these clusters.
2525

2626
Enabling the Kubernetes Service
2727
--------------------------------
@@ -38,9 +38,7 @@ Restart the Management Server to enable the set configuration values.
3838
3939
# service cloudstack-management restart
4040
41-
# service cloudstack-usage restart
42-
43-
Once the Kubernetes service is running the new APIs will become accessible and the UI will start show a Kubernetes Service tab.
41+
Once the Kubernetes service is running the new APIs will become accessible and the UI will show the Kubernetes tab under the Compute section.
4442

4543
Kubernetes Supported Versions
4644
------------------------------
@@ -128,26 +126,14 @@ Deleting supported Kubernetes version
128126
deleteKubernetesSupportedVersion API has been provided for admins to delete an existing supported version if it is not used by any Kubernetes cluster in the service. id parameter of the API can be used to pass Kubernetes version to be deleted.
129127

130128
.. note::
131-
addKubernetesSupportedVersion, updatedKubernetesSupportedVersion and deleteKubernetesSupportedVersion APIs are available to admin only
129+
addKubernetesSupportedVersion, updateKubernetesSupportedVersion and deleteKubernetesSupportedVersion APIs are available to root admins only
132130

133131
Kubernetes clusters
134132
--------------------
135133

136-
The Kubernetes service provides the functionality of running and managing Kubernetes clusters. Highly available, scalable Kubernetes clusters can be created to run containerized deployments without having to set up Kubernetes on each container node manually. The service will automatically provision the desired number of virtual machines as per cluster size using the binaries from the given Kubernetes version. Additionally, the service provides the functionality to upgrade and scale clusters. Running clusters can be upgraded to a newer minor or patch Kubernetes version at a time. Running clusters can also be scaled for the number of worker nodes up and down and for the service offering used by each node.
137-
138-
This provides functionality to create Kubernetes clusters for Shared, Isolated and VPC networks in CloudStack, but such networks must be accessible to the CloudStack management server for provisioning virtual machines on the cluster. Template and default network offering must be set Global Settings for the service to create Kubernetes clusters.
139-
140-
The following Global Settings value must be set to the name of Template to be used for deploying node virtual machines for the respective hypervisor while creating a Kubernetes cluster:
134+
The Kubernetes service provides the functionality of running and managing Kubernetes clusters. Highly available, scalable Kubernetes clusters can be created to run containerized deployments without having to set up Kubernetes on each container node manually. The service will automatically provision the desired number of virtual machines as per cluster size using the binaries corresponding to the provided Kubernetes version. Additionally, the service provides the functionality to upgrade and scale clusters. Running clusters can be upgraded to a newer minor or patch Kubernetes version at a time. Running clusters can also be scaled up or down based on the number of worker nodes provided and to the service offering used by each node.
141135

142-
- **cloud.kubernetes.cluster.template.name.hyperv** (Name of the template to be used for creating Kubernetes cluster nodes on HyperV)
143-
- **cloud.kubernetes.cluster.template.name.kvm** (Name of the template to be used for creating Kubernetes cluster nodes on KVM)
144-
- **cloud.kubernetes.cluster.template.name.vmware** (Name of the template to be used for creating Kubernetes cluster nodes on VMware)
145-
- **cloud.kubernetes.cluster.template.name.xenserver** (Name of the template to be used for creating Kubernetes cluster nodes on Xenserver)
146-
147-
Using a CoreOS template is required - you can find CoreOS templates for CloudStack here, http://dl.openvm.eu/cloudstack/coreos/x86_64/
148-
149-
.. note::
150-
For VMware, CoreOS template must be registered with root disk controller as **pvscsi** and NIC adapter type as **Vmxnet3**.
136+
This provides functionality to create Kubernetes clusters for Shared, Isolated and VPC networks in CloudStack, but such networks must be accessible to the CloudStack management server for provisioning virtual machines on the cluster. The default network offering must be set in the Global Settings for the service to create Kubernetes clusters.
151137

152138
The following Global Setting value must be set to the name of Network Offering to be used for creating a new network when no network has been selected while creating a Kubernetes cluster:
153139

@@ -169,7 +155,7 @@ For Kubernetes cluster management, the service provides create, stop, start, sca
169155
Creating a new Kubernetes cluster
170156
##################################
171157

172-
New Kubernetes clusters can be create using API or from UI. User will be provided with a Add Kubernetes Cluster form as shown below,
158+
New Kubernetes clusters can be created using the API or via the UI. User will be provided with an 'Add Kubernetes Cluster' form as shown below,
173159

174160
|cks-create-cluster-form.png|
175161

@@ -224,13 +210,13 @@ For example:
224210
}
225211
}
226212
227-
On successful creation, the new cluster will be automatically started and will show up in Running state. If creation of the new cluster fails it can be in following states:
213+
On successful creation, the new cluster will automatically be started and will show up in Running state. If creation of the new cluster fails it can be in following states:
228214
- Alert – When node virtual machines were successfully provisioned, and cluster API server is accessible but further provisioning steps could not be completed.
229-
- Error – When the service has unable to provision node virtual machines for the cluster or cluster API server is not accessible.
215+
- Error – When the service was unable to provision the node virtual machines for the cluster or if the cluster API server is not accessible.
230216

231217
.. note::
232-
- For CoreOS, a minimum of 2 cores of CPU and 2GB of RAM is needed for deployment. Therefore, the serviceofferingid parameter of createKuberntesCluster API must be provided with the ID of such compute offerings that conform to these requirements.
233-
- Private docker registry related parameters of createKubentesCluster API (dockerregistryusername, dockerregistryusername, dockerregistryurl, dockerregistryemail) provides experimental functionality. To use them during cluster deployment value for global setting, cloud.kubernetes.cluster.experimental.features.enabled, must be set as true by admin beforehand.
218+
- A minimum of 2 cores of CPU and 2GB of RAM is needed for deployment. Therefore, the serviceofferingid parameter of createKubernetesCluster API must be provided with the ID of such compute offerings that conform to these requirements.
219+
- Private docker registry related parameters of createKubenetesCluster API (dockerregistryusername, dockerregistryusername, dockerregistryurl, dockerregistryemail) provides experimental functionality. To use them during cluster deployment value for global setting, cloud.kubernetes.cluster.experimental.features.enabled, must be set to true by admin beforehand.
234220

235221
Listing Kubernetes clusters
236222
############################
@@ -242,18 +228,14 @@ listKubernetesCluster API can be used to list existing Kubernetes clusters. id p
242228
Stopping Kubernetes cluster
243229
############################
244230

245-
A running Kubernetes cluster can be stopped using both the API and |cks-stop-action.png| action icon from UI. action icon is shown for a running cluster in the UI.
246-
247-
stopKubernetesCluster can be used to stop a running cluster. It takes id of the cluster as the input parameter.
231+
A running Kubernetes cluster can be stopped using either the stopKubernetesCluster API which takes id of the cluster as an input parameter or |cks-stop-action.png| action icon from UI. action icon is shown for a running cluster in the UI.
248232

249233
Starting a stopped Kubernetes cluster
250234
######################################
251235

252-
A stopped Kubernetes cluster can be started using both API and the |cks-start-action.png| action icon from UI. action icon is shown for a stopped cluster in the UI.
236+
A stopped Kubernetes cluster can be started using either the startKubernetesCluster API which takes id of the cluster as the input parameter or the |cks-start-action.png| action icon from UI. action icon is shown for a stopped cluster in the UI.
253237

254-
startKubernetesCluster can be used to start a stopped cluster. It takes id of the cluster as the input parameter.
255-
256-
When the service fails to start a stopped cluster, the cluster will show in Alert state else it will show in Running state.
238+
When the service fails to start a stopped cluster, the cluster will show in Alert state else it will show up as Running.
257239

258240
Scaling Kubernetes cluster
259241
###########################
@@ -262,15 +244,15 @@ A running or stopped Kubernetes cluster can be scaled using both API and UI. |ck
262244

263245
|cks-scale-cluster-form.png|
264246

265-
scaleKubernetesCluster API can be used to scale a running (or stopped cluster) for a desired cluster size and service offering. It takes following parameters as input,
247+
scaleKubernetesCluster API can be used to scale a running (or stopped cluster) to a desired cluster size and service offering. It takes the following parameters as input:
266248

267249
- **id** (the ID of the Kubernetes cluster to be scaled; Required)
268250
- **serviceofferingid** (the ID of the new service offering for the virtual machines in the cluster)
269251
- **size** (number of Kubernetes cluster worker nodes)
270252

271-
Only running Kubernetes clusters can be scaled for size. When the service fails to scale the cluster, the cluster will show in Alert state else if the scaling is successfull cluster will show up in Running state.
253+
Only running Kubernetes clusters can be scaled in size. When the service fails to scale the cluster, the cluster will show in Alert state else if the scaling is successfull cluster will show up in Running state.
272254

273-
Note: Only upscaling is supported while scaling clusters for service offering.
255+
Note: Only up scaling is supported while scaling clusters for service offering.
274256

275257
Upgrading Kubernetes cluster
276258
#############################
@@ -279,30 +261,28 @@ A running Kubernetes cluster can be upgraded using both API and UI. |cks-upgrade
279261

280262
|cks-upgrade-cluster-form.png|
281263

282-
upgradeKubernetesCluster API can be used to upgrade a running cluster. It takes following parameters as input:
264+
upgradeKubernetesCluster API can be used to upgrade a running cluster. It takes the following parameters as input:
283265

284266
- **id** (the ID of the Kubernetes cluster to be upgraded; Required)
285267
- **kubernetesversionid** (Kubernetes version with which cluster to be launched; Required)
286268

287-
When the service fails to upgrade the cluster, the cluster will show in Alert state. If the upgrade has been successful cluster will show in Running state.
269+
When the service fails to upgrade the cluster, the cluster will show up in Alert state, else if successful, the cluster appears Running state.
288270

289271
.. note:: Kubernetes can be upgraded from one MINOR version to the next MINOR version, or between PATCH versions of the same MINOR. That is, you cannot skip MINOR versions when you upgrade. For example, you can upgrade from 1.y to 1.y+1, but not from 1.y to 1.y+2. Therefore, service can upgrade running clusters in the similar manner only.
290272

291273
Deleting Kubernetes cluster
292274
############################
293275

294-
Both UI and API can be used to delete a created Kubernetes cluster. |cks-delete-action.png| action icon will be available in UI to delete a cluster.
295-
296-
deleteKubernetesCluster can be used to delete a cluster. It takes id of the cluster as the input parameter.
276+
A kubernetes cluster can be deleted using either the deleteKubernetesCluster API which takes cluster id as the input parameter or the |cks-delete-action.png| action icon from the UI.
297277

298-
The Kubernetes service runs a background state scanner process which regularly checks for cluster health. For clusters in Alert state, this background process verifies their state and moves them to Running state if all node virtual machines for the cluster are running and API server for the cluster is accessible.
278+
The Kubernetes service runs a background state scanner process which regularly checks the cluster health. For clusters in Alert state, this background process verifies their state and moves them to Running state if all node virtual machines of the cluster are running and the API server for the cluster is accessible.
299279

300280
Working with Kubernetes cluster
301281
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
302282

303283
|cks-cluster-details-tab.png|
304284

305-
Once a Kubernetes cluster is created successfully and it is running state, it can be accessed using kubectl tool using cluster’s kubeconfig file. The web dashboard can be accessed by running local proxy using kubectl. Deployments in the cluster can be done using kubectl or web dashboard. More about deployment in Kubernetes here: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
285+
Once a Kubernetes cluster is created successfully and is in Running state, it can be accessed using the kubectl tool using the cluster’s kubeconfig file. The web dashboard can be accessed by running a local proxy using kubectl. Deployments in the cluster can be done using kubectl or web dashboard. More about deployment in Kubernetes here: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
306286

307287
Accessing Kubernetes cluster
308288
#############################
@@ -328,15 +308,15 @@ The following command can be used, while passing the correct path to kubeconfig
328308
329309
# kubectl --kubeconfig /custom/path/kube.config proxy
330310
331-
Once the proxy is running user can open the following URL in the browser to open the dashboard,
311+
Once the proxy is running, users can open the following URL in the browser to access the dashboard,
332312

333313
.. parsed-literal::
334314
335315
http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/
336316
337317
|cks-cluster-dashboard.png|
338318

339-
Token for dashboard login can be retrieved using following command
319+
Token for dashboard login can be retrieved using the following command:
340320

341321
.. parsed-literal::
342322

0 commit comments

Comments
 (0)