Kubernetes management: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
No edit summary  | 
				No edit summary  | 
				||
| Line 1: | Line 1: | ||
= Overview =  | = Overview =  | ||
This page describes the creation and management of Kubernetes clusters in our OpenStack-based stoney bloud.  | This page describes the creation and management of Kubernetes clusters in our OpenStack-based stoney bloud.  | ||
'''Note:''' This page is a work-in-progress, so if you face any challenges, please contact us with the specific issue.  | |||
= Images =  | |||
To list available Kubernetes images, run the following command:  | |||
<syntaxhighlight lang="bash">  | |||
openstack image list -f yaml | yq '[ .[] | select(.Name | match("(?i)kubernetes.*raw")) ]'  | |||
</syntaxhighlight>  | |||
Example output:  | |||
<syntaxhighlight lang="yaml">  | |||
- ID: 4c6f82a1-1ebc-451d-b989-947cffe72f0e  | |||
  Name: 'Ubuntu 22.04 (20240702): Kubernetes v1.28.11 (raw)'  | |||
  Status: active  | |||
- ID: c2ac4670-1422-4de6-864c-a5b813cddf61  | |||
  Name: 'Ubuntu 22.04 (20240702): Kubernetes v1.29.6 (raw)'  | |||
  Status: active  | |||
- ID: 21ad55f9-21fa-4586-932f-c9ecd20b403d  | |||
  Name: 'Ubuntu 22.04 (20240702): Kubernetes v1.30.2 (raw)'  | |||
  Status: active  | |||
</syntaxhighlight>  | |||
= Creation =  | |||
= Creation - Template =  | |||
<syntaxhighlight lang="bash">  | |||
# ID or name of the OpenStack Kubernetes image to use:  | |||
image=c539d525-d912-4acb-a7c3-bfcaf5f533c5 # Ubuntu 22.04 (20240605): Kubernetes v1.30.1  | |||
openstack coe cluster template create my_k8s_template \  | |||
  --coe kubernetes \  | |||
  --image "$image" \  | |||
  --external-network public \  | |||
  --master-flavor 'Standard Düdingen c002m0004' \  | |||
  --flavor 'Standard Düdingen c002m0004' \  | |||
  --public \  | |||
  --master-lb-enabled  | |||
</syntaxhighlight>  | |||
= Creation - Cluster =  | |||
<syntaxhighlight lang="bash">  | |||
# ID or name of the cluster template to use:  | |||
template=my_k8s_template  | |||
openstack coe cluster create my_k8s_cluster \  | |||
  --cluster-template "$template_id" \  | |||
  --master-count 1 \  | |||
  --node-count 2  | |||
</syntaxhighlight>  | |||
= Access =  | |||
To access a created cluster, use <code>openstack coe cluster config</code> to retrieve the cluster's configuration,   | |||
<syntaxhighlight lang="bash">  | |||
# ID or name of the cluster:  | |||
cluster=''  | |||
openstack coe cluster config "$cluster"  | |||
</syntaxhighlight>  | |||
= Management =  | |||
== Management - Control plane ==  | |||
TBD  | |||
== Management - Worker nodes ==  | |||
TBD  | |||
= Deletion =  | |||
== Deletion - Template ==  | |||
<syntaxhighlight lang="bash">  | |||
# ID or name of the cluster template to delete:  | |||
template=''  | |||
openstack coe cluster template delete "$template"  | |||
</syntaxhighlight>  | |||
== Deletion - Cluster ==  | |||
Use <code>openstack coe cluster delete</code> to delete a cluster:  | |||
<syntaxhighlight lang="bash">  | |||
# ID or name of the cluster to delete:  | |||
cluster=''  | |||
openstack coe cluster delete "$cluster"  | |||
</syntaxhighlight>  | |||
[[Category: Kubernetes]]  | [[Category: Kubernetes]]  | ||
Revision as of 09:18, 7 August 2024
Overview
This page describes the creation and management of Kubernetes clusters in our OpenStack-based stoney bloud.
Note: This page is a work-in-progress, so if you face any challenges, please contact us with the specific issue.
Images
To list available Kubernetes images, run the following command:
openstack image list -f yaml | yq '[ .[] | select(.Name | match("(?i)kubernetes.*raw")) ]'
Example output:
- ID: 4c6f82a1-1ebc-451d-b989-947cffe72f0e
  Name: 'Ubuntu 22.04 (20240702): Kubernetes v1.28.11 (raw)'
  Status: active
- ID: c2ac4670-1422-4de6-864c-a5b813cddf61
  Name: 'Ubuntu 22.04 (20240702): Kubernetes v1.29.6 (raw)'
  Status: active
- ID: 21ad55f9-21fa-4586-932f-c9ecd20b403d
  Name: 'Ubuntu 22.04 (20240702): Kubernetes v1.30.2 (raw)'
  Status: active
Creation
Creation - Template
# ID or name of the OpenStack Kubernetes image to use:
image=c539d525-d912-4acb-a7c3-bfcaf5f533c5 # Ubuntu 22.04 (20240605): Kubernetes v1.30.1
openstack coe cluster template create my_k8s_template \
  --coe kubernetes \
  --image "$image" \
  --external-network public \
  --master-flavor 'Standard Düdingen c002m0004' \
  --flavor 'Standard Düdingen c002m0004' \
  --public \
  --master-lb-enabled
Creation - Cluster
# ID or name of the cluster template to use:
template=my_k8s_template
openstack coe cluster create my_k8s_cluster \
  --cluster-template "$template_id" \
  --master-count 1 \
  --node-count 2
Access
To access a created cluster, use openstack coe cluster config to retrieve the cluster's configuration, 
# ID or name of the cluster:
cluster=''
openstack coe cluster config "$cluster"
Management
Management - Control plane
TBD
Management - Worker nodes
TBD
Deletion
Deletion - Template
# ID or name of the cluster template to delete:
template=''
openstack coe cluster template delete "$template"
Deletion - Cluster
Use openstack coe cluster delete to delete a cluster:
# ID or name of the cluster to delete:
cluster=''
openstack coe cluster delete "$cluster"