Skip to content

Cluster templates console

Overview

Select Kubernetes > Cluster Templates. The cluster templates console shows a list of all clusters that you can edit and delete.

Select a cluster template to view the cluster template details.

Cluster template details

Here's a table summarizing the properties and attributes that you should understand in order to work with cluster templates in the Kubernetes service:

Property/Attribute Description
Name A human-readable name for the cluster template, used for identification purposes.
ID A unique identifier automatically assigned to the cluster template by OpenStack.
COE (Container Orchestration Engine) Specifies the container orchestration engine to use, such as Kubernetes, Docker Swarm, or Mesos.
Image ID The ID of the image used for the cluster nodes. This image should contain the necessary COE components.
Flavor ID The ID of the flavor (size) to use for the cluster nodes, determining the compute, storage, and memory resources.
Master Flavor ID (Optional) The ID of the flavor to use specifically for master nodes in the cluster.
DNS Nameserver The IP address of the DNS nameserver to use for the cluster.
External Network ID The ID of the external network that provides connectivity to the public internet.
Fixed Network (Optional) The name of the fixed network to use for internal cluster communication.
Network Driver The network driver to use for the COE, such as Flannel or Calico for Kubernetes.
Volume Driver The volume driver to use for persistent storage, such as Cinder for Kubernetes.
Docker Storage Driver The storage driver to use for Docker, such as overlay2 or devicemapper.
Labels Key-value pairs that specify additional configuration options for the cluster.
TLS Disabled A boolean value indicating whether TLS should be disabled for the cluster.
Key Pair ID (Optional) The ID of the key pair to use for SSH access to the cluster nodes.
Server Type Specifies the server type, such as vm for virtual machines or bm for bare metal.
Public A boolean value indicating whether the cluster template is public and accessible to all users.
Registry Enabled A boolean value indicating whether an integrated container registry is enabled for the cluster.

Understanding these properties and attributes is helpful for effectively creating and managing cluster templates. Templates define the configuration and capabilities of the clusters that will be created based on the template, enabling you to tailor container environments to your specific needs and workloads.

Cluster template example

Example cluster template from https://github.com/openstack/heat-templates/blob/master/hot/magnum/create_coe_cluster.yaml.

YAML
heat_template_version: pike

description: >
  This template demostrates how to create Magnum COE cluster.

parameters:
  cluster_name:
    type: string
    description: (optional) Name for cluster.
    default: coe_cluster
  node_count:
    type: number
    default: 1
    description: The node count for this cluster.
  master_count:
    type: number
    default: 1
    description: The number of master nodes for this cluster.
  create_timeout:
    type: number
    default: 60
    description: Timeout for creating the cluster in minutes.
  cluster_template_name:
    type: string
    description: (optional) Name for cluster.
    default: coe_cluster_template
  keypair:
    type: string
    default: key
    constraints:
      - custom_constraint: nova.keypair
  flavor:
    type: string
    description: Flavor for the COE nodes to be created
    default: m1.small
    constraints:
      - custom_constraint: nova.flavor
  master_flavor:
    type: string
    description: Flavor for the COE masters to be created
    default: m1.small
    constraints:
      - custom_constraint: nova.flavor
  image:
    type: string
    description: Image ID or image name to use for the COE nodes/masters
    constraints:
      - custom_constraint: glance.image
  external_network:
    type: string
    description: The external neutron network to attach the Cluster
    constraints:
      - custom_constraint: neutron.network
  coe:
    type: string
    description: The Container Orchestration Engine for cluster
    default: kubernetes
  server_type:
    type: string
    description: Specify the server type to be used
    default: vm
  registry_enabled:
    type: boolean
    description: Enable the docker registry
    default: False
  master_lb_enabled:
    type: boolean
    description: clusters should have a load balancer for master nodes or not
    default: False
  floating_ip_enabled:
    type: boolean
    description: clusters should have a floating ip for master nodes or not
    default: False

resources:
  coe_cluster:
    type: OS::Magnum::Cluster
    properties:
      name: { get_param: cluster_name }
      cluster_template: { get_resource: coe_cluster_template }
      keypair: { get_param: keypair }
      node_count: { get_param: node_count }
      master_count: { get_param: master_count }
      create_timeout: { get_param: create_timeout }

  coe_cluster_template:
    type: OS::Magnum::ClusterTemplate
    properties:
      name: { get_param: cluster_template_name }
      flavor: { get_param: flavor }
      keypair: { get_param: keypair }
      master_flavor: { get_param: master_flavor }
      image: { get_param: image }
      external_network: { get_param: external_network }
      coe: { get_param: coe }
      server_type: { get_param: server_type }
      registry_enabled: { get_param: registry_enabled }
      master_lb_enabled: { get_param: master_lb_enabled }
      floating_ip_enabled: { get_param: floating_ip_enabled }

outputs:
  coe_api_address:
    description: The endpoint URL of COE API exposed to end-users
    value: { get_attr: [coe_cluster, api_address] }
  coe_stack:
    description: The reference UUID of orchestration stack for the COE cluster
    value: { get_attr: [coe_cluster, stack_id] }
  coe_discovery_url:
    description: The custom discovery url for node discovery.
    value: { get_attr: [coe_cluster, discovery_url] }
  container_version:
    description: Version info of container environment.
    value: { get_attr: [coe_cluster, container_version] }
  coe_version:
    description: Version info of chosen COE.
    value: { get_attr: [coe_cluster, coe_version] }
Template components

Orchestration Engine: Specifies the container orchestration engine to be used for the cluster, such as Kubernetes, Docker Swarm, or Apache Mesos.

Image: Defines the image to be used for the nodes in the cluster. This image should have the necessary software pre-installed to support the chosen orchestration engine.

Flavor: Specifies the flavor (size) of the instances to be used for the master and worker nodes in the cluster. The flavor determines the amount of CPU, memory, and storage resources allocated to each node.

Network Driver: Identifies the networking driver or plugin to be used for the cluster, which can affect how containers communicate within the cluster and with external networks.

Volume Driver: Specifies the storage driver or plugin to be used for managing persistent volumes in the cluster.

External Network: Defines the external network to be used for providing external access to the cluster. This is typically used for assigning floating IP addresses to the master nodes or load balancers.

Key Pair: Identifies the SSH key pair to be used for secure access to the nodes in the cluster.

Labels and Options: Allows for the specification of additional labels and options that can be passed to the orchestration engine for custom configuration.

Master and Worker Node Counts: Defines the number of master and worker nodes to be created in the cluster. Some orchestration engines may support multi-master configurations for high availability.

Auto Scaling: Some cluster templates may include configuration for auto-scaling, allowing the cluster to automatically adjust the number of worker nodes based on workload demands.

Kubernetes service

Kubernetes service CLI reference

Kubernetes service API reference

See also