Generic Provider
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
- Dashboard: Provides a Kubernetes dashboard UI for the cluster.
- AWS Workload Identity: Allows your pods to assume AWS IAM Roles.
- AWS ECR: Allows pulling images from private ECR registries.
- Local Path Storage: Create PVCs backed by local volumes.
- Logs: Enable logging for pods and cluster auditing.
Step 1 - Servers Setup
- 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
- Server(s) requirements:
Step 2 - Creating Managed Kubernetes Cluster with Manifest
- Update the manifest below: (Optional) Modify the following
generic-mk8s-template.yaml
YAML manifest if needed.
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.
-
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 thecpln apply >_
option in the upper right corner.
Wait until the cluster is initialized.
- CLI: Execute
Step 3 - Connecting the Server(s) to the Cluster
-
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 thegeneric-mk8s-example
cluster, and go toNode Pools
. Click onMore
on the right side of thegeneral
Node Pool and selectGenerate Join Script
.
-
-
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
- Obtain the Cluster’s Kubeconfig File: Execute the command
cpln mk8s kubeconfig generic-mk8s-example -f /tmp/generic-mk8s-example-conf
. - Access the Cluster with
kubectl
: Use the obtained kubeconfig file by runningexport KUBECONFIG=/tmp/generic-mk8s-example-conf
for the current shell session.
2. Using Kubernetes Dashboard
- Navigate to Control Plane Console: Visit the Control Plane Console.
- Access the Dashboard: In the Control Plane Console, navigate to
Kubernetes
in the left sidebar panel and click onOpen
underDashboard
for the clustergeneric-mk8s-example
.