Nodelet

A nodelet is a small software agent installed and run on each node as part of the Platform9 Managed Kubernetes (PMK) stack within a cluster. The nodelet agent provides multiple functions on both the Primary/Master and the nodes. This includes the installation and configuration of multiple Kubernetes services.

Syntax

[root@server ~]# nodeletd phases [command]

Nodelet Phases

Generate Certificates

Role: Master Worker

Generates prerequisites checks needed to install various certificates.

Prepare Kube Configs

Role: Master Worker

Customizes the kubeconfigs needed to start the Kubernetes cluster.

Docker Configure

Role: Master Worker

Installs and configures docker and containerd.

Docker Start

Role: Master Worker

Installs and verifies running docker containers.

Etcd Configure

Role: Master

Verifies, configures, and runs etcd on the primary host server's filesystem.

Etcd Run

Role: Master

Starts and confirms the etcd service is running on the container.

Network Configure

Role: Master

Ensure that the CIDR configuration for flannel is up-to-date (It does not target other network plugins like Calico, Canal and Weave).

CNI Configure

Role: Master Worker

Configures the Container Network Interface (CNI).

Auth Webhook

Role: Master

Uses bouncer as a simple webhook endpoint server to validate/authenticates images created within the Kubernetes clusters (specifically, the admission controllers GenericAdmissionWebhook and the ValidatingAdmissionWebhook).

Misc Scripts

Role: Master Worker

Responsible for composing the cloud provider config on the filesystems of all nodes.

Kubelet Configure/Start

Role: Master Worker

Starts and manages the proper configurations on Kubelets.

Kube Proxy Start

Role: Master Worker

Starts and configures the kube-proxy service.

Wait for K8s Services

Role: Master Worker

Starts and pauses various K8s services to ensure availability.

Label and Taint Node

Role: Master Worker

Designates "master" or "worker" nodes. Additionally, taints workloads not allowed on master

Dynamic Kubelet Configuration

Role: Master Worker

Creates a ConfigMap in the kube-system namespace which defines the default kubelet type as either a "master" or "worker" node.

Uncordon Node

Role: Master Worker

Marks nodes as schedulable using the kubectl uncordon node command

Deploy App Catalog

Role: Master

Configures and deploys the Monocular and Tiller services

Configure/Start Keepalived

Role: Master

Configures and starts the KeepAlive service

Deploy Luigi Operator

Role: Master

Activates the Luigi Networking Operator.

Deploy KubeVirt

Role: Master

Deploys KubeVirt operator in addition to its other custom resources.

Enable PF9 Sentry

Role: Master

Initiates and configures the pf9-sentry service within the platform9-system namespace

Enable PF9 Add-on Operator

Role: Master

Starts and configures the pf9-addon-operator service within the pf9-addons namespace

Drain All Pods (Stop Only)

Role: Master Worker

If invoked, this task drains the node before implementing a stop function on other tasks. When the _pf9-kube_ service begins draining the node, it executes a priority stop function. This ensures the task is prioritized over the stop function of other tasks.

CLI

The following section specifies the nodeletd phase related commands used to interact with the k8s stack via the command line.

Bash
Copy

List Phases

The nodeletd service shows the phases flag list functions.

Sample Output
Copy

Stop

These nodeletd phase options stop the pf9-kube stack.

Bash
Copy

Start

These nodelet phase options start the pf9-kube stack.

Bash
Copy

Restart

These options restart the pf9-kube stack.

Bash
Copy

Status

This option provides information on the condition and state of the pf9-kube stack.

Sample Output
Copy

Note: CLI output will contain info about the various phases that run before the following table is displayed. This info is also contained in the /var/log/pf9/kube/kube.log file.

Node Health

This curl command provides an exhaustive overview of a specific node. A sample output is shown below.

Bash
Copy
Sample Output
Copy

Note: The last_failed_status_check field is cleared 10 minutes after the status check is successful.

The pf9_kube_service_state tries to simulate the node state as reported by the hostAgent. The values this field can report on are as follows:

StatusDescription
OKEverything is fine.
ConvergingStarting pf9-kube failed and this is the initial attempt to restart it.
RetryingStarting pf9-kube failed and Nodelet has tries less than 10 times to start pf9-kube.
FailedStarting pf9-kube failed and Nodelet has tried more than 10 times to start pf9-kube.

Advanced / Experimental Features

The advanced and/or experimental features listed below are not advised for use in a production environment, and should only be used for testing purposes or as a "last-resort". Enterprise customers should consult Platform9 Support prior to running any of the commands listed below.

Single Phase Operation

Clients can operate on a single phase by specifying the --single argument to start/stop/restart operation.

Bash
Copy

Force Stop

By default, Nodelet will abort a "stop" operation if one of the phases fails to “stop” cleanly. This action can be overridden by adding the --force flag to the stop operation.

Bash
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard