The Generic provider for Managed Kubernetes allows Linux-based servers to be converted into worker nodes of a Kubernetes cluster, irrespective of their deployment in public clouds (such as AWS, Azure, GCP, Hetzner, etc.) or in private cloud / on-premises environments. Once integrated, these servers join a Kubernetes cluster as worker nodes, enabling the deployment of Kubernetes workloads through the Kubernetes API.

Supported Add-Ons

Step 1 - Servers Setup

  1. Ensure Availability of Server(s): Create at least one server that matches the server requirements:
    • Server(s) requirements:
      • Linux Kernel version 5.x.x or higher
      • Minimum CPU: 1 Core
      • Minimum RAM: 512 MB
    • Servers require Internet egress access
    • Ensure you have SSH access to the servers

Step 2 - Creating Managed Kubernetes Cluster with Manifest

  1. Update the manifest below: (Optional) Modify the following generic-mk8s-template.yaml YAML manifest if needed.
YAML
kind: mk8s
name: generic-mk8s-example
description: generic-mk8s-example mk8s in gcp-us-east1
tags: {}
spec:
  provider:
    generic:
      location: gcp-us-east1
      nodePools:
        - name: general
          labels:
            environment: generic-mk8s-example
          taints: []
  addOns:
    dashboard: {}
    localPathStorage: {}
    awsWorkloadIdentity: {}
  firewall:
    - description: default
      sourceCIDR: 0.0.0.0/0
  version: 1.28.2

This example creates a Generic cluster with the following configurations:

  • Add-ons: Includes Dashboard, Local Path Storage, and AWS Workload Identity.
  • Location: The cluster’s Kubernetes control plane will be managed in the gcp-us-east1 location. Placing worker nodes close to the control plane is recommended for optimal performance.
  • Kubernetes API Firewall: Utilizes the Default rule, allowing public access to the Kubernetes API. It is advisable to restrict API access to a known IP range for security purposes.
  • Kubernetes Version: 1.28.2.
  • Node Pool: A single general node pool.
  1. Create the Cluster: Deploy the generic-mk8s-example cluster by applying the manifest.

    • CLI: Execute cpln apply -f generic-mk8s-template.yaml --org YOUR_ORG_HERE.
    • Console: Apply the generic-mk8s-template.yaml file using the cpln apply >_ option in the upper right corner.

    Wait until the cluster is initialized.

Step 3 - Connecting the Server(s) to the Cluster

  1. Obtain the Join Script:

    • Using the CLI: a. Save the Join Script to a file: Execute the command cpln mk8s join generic-mk8s-example --type join-script --options nodePoolName=general > join_general.sh

    • Using the UI: a. Navigate to the Control Plane Console: Visit the Control Plane Console. b. Access the Dashboard: In the Control Plane Console, navigate to Kubernetes in the left sidebar panel, click on the generic-mk8s-example cluster, and go to Node Pools. Click on More on the right side of the general Node Pool and select Generate Join Script.

  2. Copy and Execute the Script on the Server: Connect to the remote server and execute the Join Script. After the execution, the server should be joined to the cluster as a node under the general node pool. Repeat these steps for all necessary servers.

Step 4 - Accessing the Cluster

1. Using the Terminal

  1. Obtain the Cluster’s Kubeconfig File: Execute the command cpln mk8s kubeconfig generic-mk8s-example -f /tmp/generic-mk8s-example-conf.
  2. Access the Cluster with kubectl: Use the obtained kubeconfig file by running export KUBECONFIG=/tmp/generic-mk8s-example-conf for the current shell session.

2. Using Kubernetes Dashboard

  1. Navigate to Control Plane Console: Visit the Control Plane Console.
  2. Access the Dashboard: In the Control Plane Console, navigate to Kubernetes in the left sidebar panel and click on Open under Dashboard for the cluster generic-mk8s-example.