Skip to content

Configuring a Cluster

This topic describes setting Kubernetes cluster alert notifications and managing clusters.

Setting up a cluster alert notification

You can configure cluster PrometheusAn open-source systems monitoring and alerting toolkit for dynamic container environments. alerts to assist with troubleshooting. When you set an alert, Prometheus monitors the services running on a cluster every two minutes and alerts you when it detects an issue or identifies an issue before it occurs. For example, you can set an alert to be notified when a cluster exceeds a certain bandwidth threshold within the next 30 days.

Megaport ONE provides alert templates for easy configuration.

To set cluster alert notifications

  1. Select a cluster name from the Clusters page.

  2. Select the Alerts tab.

  3. Click New Alert.

  4. Select an alert template from the drop-down list of preconfigured templates.

  5. Configure the alert settings.

  6. For alerts that trigger off a certain threshold, enter the threshold value.
    For example, after selecting the Kubernetes out of capacity template, enter 80 to receive an alert when a cluster has reached 80 percent capacity.

  7. Select at least one destination type to receive the notification when an alert is triggered.

    • Enter an incoming Slack Webhook URL to receive the alert via Slack.

    • Enter one or more phone numbers to receive the alert via SMS. Start the phone number with +, followed by the country and area codes, up to a maximum of 15 digits.

  8. Click Confirm.

The alert appears on the list, along with its status, how often Prometheus polls the cluster for status, and where the notification is sent when the alert is triggered.

To delete an alert

  1. Choose Compute > Clusters.

  2. Select a cluster name from the Clusters page.

  3. Select the Alerts tab.

  4. Click the gear icon next to the alert name.

  5. Type DELETE in all caps and click Delete to confirm.

Creating a Kubernetes secret

A Kubernetes secret is a special type of object that stores secret and sensitive data such as a password, a token, or a key. Secrets help you organize and distribute sensitive information across a cluster. You add Kubernetes secrets to a cluster from the Application Configuration page, and you can add multiple keys and values into a secret.

To add general secret details

  1. Select a cluster and click Manage Secrets.

  2. Click Add Secret.

  3. Select the General Tab.

  4. Type a secret name using lowercase letters, numbers, or hyphens. Don’t use dots, spaces, or underscores.

  5. Select a secret type from the drop-down list.

  6. Enter a namespace.

  7. Select the cluster to add the secret to from the drop-down list.

  8. Select No to prevent the new secret from overwriting existing secrets using the same name or Yes to replace an existing secret using the same name.

  9. Click Create.

To add a secret key and value pair

  1. From the Deploy <application> page, select a cluster and click Manage Secrets.

  2. Click Add Secret.

  3. Select the Data tab.

  4. Enter the secret name and its value as a plain text string.

    Note

    The system encodes the secret using a base64 representation.

    You can enter more than one key and value pair to a secret. For example:

    redis-password: aquest

    certificate-key: pjystn

    certificate-crt: abcdfg

  5. Click Create.

Adding annotations and labels to a secret

Annotate a secret with helpful information, such as who created it, for reference later. An annotation is a key-value pair that provides metadata about a secret.

Label a secret with metadata to identify and group related secrets.

Tip

The difference between annotations and labels is that labels use metadata to identify secrets and you can use them to group related secrets. Annotations are for arbitrary, non-identifying metadata.

To add an annotation to a secret

  1. Click Add Secret.

  2. Select the Annotations tab.

  3. Enter the annotation name and its value.

    You can enter more than one annotation to a secret.

  4. Click Create.

Viewing and editing Kubernetes secrets

  • From the Deploy <application> page, select a cluster and click Manage Secrets.

    • Click View to see the secret keys and values, URL, and any key labels or annotations.

    You can click the key value on the Data tab to copy it to the clipboard.

    • Click Edit to edit the secret key values, URL, labels, or annotations and then click Update.

Deleting namespaces

A cluster namespace groups related resources. Deleting a namespace deletes all of the resources within it, including all applications, secrets, pods that are running, and so on.

Important

Be careful when deleting a namespace. Make sure that you want to delete not only the namespace but all of its resources as well.

To delete a cluster namespace

  1. Select a cluster name from the Clusters page.

  2. Select the Namespaces tab.

  3. Click Delete.

  4. Type DELETE in all caps and click Delete to confirm.

Downloading cluster details

An automatically generated kubeconfig.yaml file contains authentication information for users and cluster connection information. You may download this file with these permissions: Company Admin and Technical Admin.

To download a kubeconfig file

  1. Select a cluster name from the Clusters page.

  2. Select the Overview tab.

  3. Select Download KubeConfig from the Actions menu.

Deleting a cluster

When you delete a cluster, these resources are deleted:

  • The control planeThe container orchestration layer that exposes the API and interfaces to define, deploy, and manage the lifecycle of containers. resources
  • All of the node instances in the cluster
  • All cluster jobs
  • All stored data

To delete a cluster

  1. Choose Compute > Clusters.
    The Clusters page shows every Kubernetes cluster deployed in your organization.
  2. Select a cluster.
  3. From the Actions menu, choose Delete Service.
  4. Type DELETE in all caps and click Delete to confirm.

The deletion process proceeds through these states before finishing:

Cluster Deletion States


Last update: 2023-05-23