* refactor(controller): ask one cluster method at each control-plane endpoint gate Each gate that scales, upgrades or replaces control-plane nodes tested the control-plane VIP for an empty string by itself. The gates now call db.Cluster.HasStableControlPlaneEndpoint, which is true when the cluster has a VIP. The gates are the count check at create and scale, the upgrade and rollout checks of the cluster API, the node delete guard, the control-plane controller (recycling, remediation, rebalance, stuck pending nodes) and the node pool controller (surge, NodeSet replacement). No behavior changes. A later change adds a second kind of stable endpoint to the method. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * feat(controller): add controlPlaneEndpoint to the cluster API schema A cluster can name an API server endpoint that NVKE does not manage, for example a load balancer in front of the API servers. The create request gets the optional object controlPlaneEndpoint. Its type says who manages the endpoint, and the block named after the type carries what that type needs. This change has one type, External, with a host and an optional port in the external block. The port defaults to 6443. The cluster response returns the type and the resolved host and port. The update request has no such property, so the value is fixed at creation. The shape is the one of the proposal for a load balancer as the control plane endpoint, and this change is its first part. The enum of the type has only External. The other types of the proposal come later. A new enum value passes the API compatibility check, and a removed one does not, so the enum lists only what the code does. The existing descriptions change only where the new field makes them wrong or incomplete: - The overview of the Clusters tag and the description of controlPlaneVIP say which address is the API server endpoint. - Seven sentences that say an operation requires controlPlaneVIP now name both fields. Each is one changed line. - The 400 list of the create operation gets the new reasons. - The desiredNodeCount descriptions of the two node pool requests lose their sentence about control-plane pools. The node pool handlers refuse each create and each update of a control-plane node pool, so no request reaches a rule on that count. This change is only api/openapi.yaml and the code that make generate writes from it (models.gen.go, server.gen.go). The handler does not read the field yet. The next changes store it, check it and use it. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * feat(controller): store controlPlaneEndpoint in the clusters table The clusters table gets three nullable columns for the API server endpoint that a cluster was created with: control_plane_endpoint_type, control_plane_endpoint_host and control_plane_endpoint_port. db.Cluster gets the fields ControlPlaneEndpointType, ControlPlaneEndpointHost and ControlPlaneEndpointPort. The type says who manages the endpoint. The one type is External, an endpoint that NVKE does not manage. The host and the port are the resolved endpoint. A cluster without the field stores NULL in the three columns, which is what each existing row has after the migration. An empty type marks such a row. control_plane_vip does not change. No handler writes the fields yet and no workflow reads them. The test proves that the values come back from a read and stay in the row through an update of the cluster. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * feat(controller): count controlPlaneEndpoint as a stable endpoint at each gate db.Cluster.HasStableControlPlaneEndpoint is now true for a cluster with an endpoint of the type External, as it is for one with a VIP. Each gate that scales, upgrades or replaces control-plane nodes asks this method, so the one line opens them all: scale-up, upgrade and rollout in the cluster API, node delete, recycling, remediation, rebalance, stuck pending nodes, surge and NodeSet replacement. The method reads the stored type and not the host. An empty type is a cluster without the field, and a type that this controller does not know is no stable endpoint. The tests run each gate with such a cluster. Recycling, remediation, rebalance and stuck pending nodes share one check, controlPlaneReplacementBlocked, which gets its own test. The 400 messages and the log warnings of the gates keep their text. Each of them is given only for a cluster with no VIP and no controlPlaneEndpoint. allowControlPlaneWithoutVIP keeps its meaning and its default. No cluster has the field yet, because the create request does not store it. A later change adds that, with the count check at create. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * feat(controller): check controlPlaneEndpoint on cluster create The create request is now rejected with 400 when it has both controlPlaneEndpoint and controlPlaneVIP, when the type is not External, when the type External has no external block, and when the host or the port is not valid. The host is a DNS name or an IPv4 address. A DNS name is lowercase, has at most 253 characters, no trailing dot and no wildcard. An IPv4 address must be unicast, not loopback and not link-local, and outside the pod and service CIDRs. The port is a number from 1 to 65535, and 6443 when the request has none. A host of only digits and dots must be a valid IPv4 address, so that a mistyped address does not pass as a DNS name and skip the address rules. A DNS name is not checked against the CIDRs, because NVKE cannot tell which addresses it resolves to. The host is not trimmed. NVKE does not resolve or dial the endpoint. The CIDR rule of controlPlaneVIP moves into a helper that both fields use. Its messages keep their text, and the checks of controlPlaneVIP do not change. The checks come before the change that stores the value, so that no commit stores a value without them. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * feat(controller): use controlPlaneEndpoint for kubeadm init kubeadm init now takes its controlPlaneEndpoint from one function, kubeadmControlPlaneEndpoint. For a cluster with an external endpoint the value is host:port. Without one it is the kube-vip VIP, then the IP of the initializing node, as before. The value goes into the ClusterConfiguration and into the request to the node agent, as before. NVKE also names the host of an external endpoint in apiServer.certSANs of the ClusterConfiguration. kubeadm adds the host of its controlPlaneEndpoint to the API server certificate by itself. The explicit entry keeps certificate renewal and control-plane joins correct if that default changes. A cluster without an external endpoint gets no certSANs entry, so its configuration does not change. The step fails for a cluster row with an endpoint type that this controller does not know, and for an external endpoint with no host or no port. The address goes into each certificate and each kubeconfig of the cluster, so the step does not guess. The kube-vip step needs no change and gets no check for the new field. It returns with no action for a cluster without a VIP, and a cluster with a controlPlaneEndpoint has no VIP: the create request refuses the two fields together, and no other request writes either of them to the cluster row. One test keeps this true: for such a cluster the step makes no kube-vip call and runs no script on the node. Each later step reads the endpoint back from what kubeadm wrote: the join string, admin.conf and the Cluster API endpoint. They need no change. No cluster has the field yet. The next change makes the create request store it. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * feat(controller): accept controlPlaneEndpoint on cluster create The create request now stores controlPlaneEndpoint in the cluster row: the type, the host and the resolved port, which is 6443 when the request names none. The cluster response returns the type and the resolved host and port. The response leaves the field out when the cluster has none. The count check at create asks HasStableControlPlaneEndpoint of the fields that the request would store. So a request with an external endpoint can ask for more than one control-plane node, as one with a VIP can. The tests go through the service and through the HTTP handler with the OpenAPI validator: at each level requests that are accepted and requests that are refused, then the bounds that only the schema checks, and a PATCH with the field, which the schema refuses. One test checks the JSON form of the field in the response. The full table of refused values is in the test of the check itself. This change comes after each part that reads the value, so that no cluster can have the field before kubeadm init uses it. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * docs: describe controlPlaneEndpoint for workload clusters The pages that state the VIP rule now name controlPlaneEndpoint as the second way to give a cluster a stable API address: the cluster spec table and the count rule in the create guide, the API address in the two access pages, the upgrade rule in the supported platforms, and the installation plan. The create guide shows the object with the type External, its host and its port, and says what the response returns. It says what the endpoint must do before the request, and that NVKE does not resolve or call the endpoint when it accepts the request. The access page says that NVKE does not take a node out of the endpoint before it restarts the API server or etcd there, so the health check of the endpoint must do it. The pages come after the change that stores the value, so that each sentence is true when it is added. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * fix(controller): reject a DNS label over 63 characters in controlPlaneEndpoint The host check of an external control plane endpoint used IsDNS1123Subdomain, which checks the whole length and the form of a DNS name and not the length of each label. So a name with a label of 64 characters passed the check, and DNS has no such name. The check now also rejects a label of more than 63 characters. The text of the field in the spec says so, and the generated code follows it. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * docs: say that an endpoint health check acts after the failure The access page said that the endpoint must stop traffic to a node through its own health check. A health check sees a failure only after it happens, so a call can fail between the restart of the API server or of etcd and that check. The page says so now. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> --------- Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
17 KiB
Plan your installation
Preview: NVKE is available as a preview. APIs, configuration and behavior can change between releases, and we do not recommend NVKE for production workloads. See Preview status and known limitations.
This page describes what you need before you install NVIDIA Kubernetes Engine (NVKE) on your own hardware, which settings cannot change later, and which values to collect. Read it before every other installation page.
Before you begin
- You have read What is NVKE.
- You have checked your hardware and versions against Supported platforms and versions.
- You have read Preview status and known limitations. Two limitations shape the plan: the management cluster does not upgrade, scale or replace its own nodes, and NVIDIA Infra Controller (NICo) is the default infrastructure provider, with LaunchLayer available only once a deployment enables it.
What you end up with
A management cluster with an odd number of nodes, each a control-plane node that also runs the NVKE management plane. The management plane requests machines from NICo through CAPNICo, the Cluster API infrastructure provider for NICo, and forms workload clusters on them for your customers. You get there in seven steps:
| Step | What you do | Page |
|---|---|---|
| 1. Build | Build the reference node OS image and host its boot files over HTTP(S). | Build and host node OS images |
| 2. Prepare nodes | Boot the management cluster's nodes from the node image with cloud-init user data, and record each node's TPM thumbprint. | Prepare nodes |
| 3. Bootstrap | Run nvkectl bootstrap site to form the management cluster. |
Bootstrap the management cluster |
| 4. Install | Install Cluster API, CAPNICo, SPIRE, telemetry and the NVKE API and controllers, and admit your networks to the API. | Install the management plane |
| 5. Configure NICo | Confirm that CAPNICo is running, and collect the NICo identifiers each workload cluster needs. | Configure an infrastructure provider: NICo |
| 6. Secure the API | Make the NVKE API require a token from your identity provider. | Secure the NVKE API |
| 7. Create clusters | Create a workload cluster. | Create a workload cluster |
What you need before you start
Machines and storage
- Management cluster nodes. An odd number of machines, such as one, three or five, each with a TPM 2.0 device. Your provisioning system boots each from the node image with cloud-init user data. The node image uses DHCP, so reserve each node's address. Each node has more memory than the kubelet reserves for the system, 16 GiB by default.
- A storage provisioner for the management cluster's default StorageClass. The bootstrap installs none, and the management plane's database claims a 40 GiB volume.
- Workload cluster machines enrolled in NICo, which provisions them from your node image.
NICo
- A site with machines enrolled.
- A virtual private cloud (VPC) in that site, with VPC prefixes or subnets for the nodes.
- One or more instance types, each with an allocation for your organization. An instance type with no allocation provisions nothing.
- An SSH key group, if you want SSH access to nodes.
- The NICo API endpoint, your organization ID, an API token and the API name your NICo deployment serves.
Network
- A Kubernetes API virtual IP address (VIP) for the management cluster when it has more than one node, and for each workload cluster with more than one control-plane node, unless that cluster uses a
controlPlaneEndpointthat you operate yourself. Each VIP is an unused, routable IPv4 address outside the cluster's pod and service networks. A single-node management cluster built from your own nodes, as on these pages, uses its node's IP instead. A site spec withinfra.provider: nico, whose nodes NICo allocates, needs the VIP even for one node; seecluster.controlPlaneVIP. - Border Gateway Protocol (BGP) peering for each VIP. Every control-plane node advertises the VIP to the node's default gateway. The controller chart defaults
kubeVip.localASNto65100andkubeVip.staticPeerASNto4294967000; override these to match the site's BGP configuration. Both settings are optional in Helm values and controller configuration files; omitting them preserves existing ASN behavior. The static default is an RFC 6996 private-use ASN matching NICo's base configuration, not a universal default. NICo VPC-prefix pools resolve their peer ASN from the node's metadata service. SettingKUBE_VIP_FMDS_ENDPOINTin the management plane'senvforces metadata lookup for every provider. These settings apply when the controller configures kube-vip. Your network must accept the route and carry it to the cluster's API callers. - Pod and service networks for each cluster that do not overlap each other or your node network.
- Outbound access from the bootstrap host and the management cluster to the registries and chart repositories listed in Install the management plane.
- A boot-artifact HTTP(S) endpoint reachable from the machines' provisioning network before the installed OS starts. For QCOW2 imaging, it serves the EFI imager and QCOW2; for an ISO install, it serves the kernel, initrd and ISO. See Serve the boot artifacts over HTTP(S) for hosting, an S3 example and download checks.
Ports
All connections are TCP; traffic between the nodes of one cluster is not listed. The management address is the management cluster's API VIP, or the node IP of a single-node management cluster.
| Source | Destination | Port | Purpose |
|---|---|---|---|
| Machines being provisioned | Boot-artifact HTTP(S) endpoint | The port in the URL, usually 80 or 443 | Downloading boot scripts, EFI imagers and OS images before the installed OS starts. |
| Bootstrap host | Each management cluster node | 15005 | nvke-agent, which the bootstrap drives. |
| Each management cluster node | Bootstrap host | 30081 | SPIRE server, for TPM node attestation during the bootstrap. |
| Bootstrap host and install host | Management cluster API address | 6443 | Kubernetes API. |
| Each control-plane node with a VIP | The node's default gateway | 179 | BGP, to advertise the VIP. |
| API callers | Management address | 30080 | NVKE API, plain HTTP. |
| Workload cluster nodes | Management address | 30440 | SPIRE server, for node attestation. |
| Management cluster | Each workload cluster node | 15005 | nvke-agent, which the management plane drives. |
| Management cluster | Each workload cluster API address | 6443 | Cluster lifecycle operations. |
| Management cluster | NICo API endpoint | The port in the endpoint URL | Requesting machines. |
| Management cluster | Your identity provider's signing-key URL | The port in that URL | Fetching token signing keys, if you secure the API. |
| Customers | Their workload cluster's API address | 6443 | Kubernetes API. |
Identity and trust
- A SPIFFE trust domain, such as
mgmt.example.com. - Your own SPIRE certificate authority (CA): a certificate and key as files. The certificate goes into every management node's user data; both files go on the bootstrap host. Management nodes built from the node image cannot attest without it. The install also makes it the upstream authority of the management cluster's SPIRE server, which workload cluster nodes trust through the bundle NVKE puts in their user data.
Registries
- A container registry you control, only if you supply the controller or profile content image from one, with an account that can push to it. If pulling needs credentials, the management cluster needs them too.
- CAPNICo's published image is public on
ghcr.io, so it needs no credentials. - Where a release's artifacts come from. NVKE does not publish release pages or downloads on GitHub. You check out the release tag in your
nvkeclone and build the node image andnvkectlfrom it, as described in Build and host node OS images and Install nvkectl. The install takes the controller and profile images fromimages.controllerandimages.profilesin the stack config, or every chart and image by digest from an NVKR release description; see Install the management plane.
Hosts and tools
| Host | Needs |
|---|---|
| Node-image build host | Linux matching the target architecture, with KVM access and the tools listed in Build the OS image. |
| Bootstrap host | Linux, run as root, with rootful nerdctl and containerd, kind, helm, kubectl, clusterctl, Go and GNU Make. Docker is not supported. Normally this is one of the management cluster nodes; a separate host also works. |
| Install host | nvkectl, helm v4.2.4, kubectl, clusterctl v1.13.6, curl, python3 and git. It can be the bootstrap host. |
| API workstation | nvkectl, curl and jq; with API authentication, also the kubectl oidc-login plugin and python3. |
Identity provider
API authentication is off by default: any caller that reaches port 30080 can call every endpoint. To secure the API, you need an OpenID Connect (OIDC) identity provider that:
- Publishes an OIDC discovery document over HTTPS, with a signing-key endpoint the management cluster can reach.
- Signs tokens with an asymmetric algorithm, such as
RS256orES256. - Puts group membership in a token claim named
groups. - Has an OIDC client for
nvkectlthat needs no client secret.
NVKE admits callers by group. Every admitted caller can call every endpoint until authorization enforces. Authorization gives each caller a role by a claim such as groups, as described in Authorize API callers by role.
Decide before you install
| Setting | Fixed at | What to decide |
|---|---|---|
| Management cluster node count | Bootstrap | An odd number. The management cluster cannot add or replace nodes, so size it for the life of the installation. |
| Management cluster etcd encryption | Bootstrap | On by default. A management cluster bootstrapped without it stays unencrypted. |
| Management cluster API VIP | Bootstrap | Required for more than one node, and for one node with infra.provider: nico. |
| SPIFFE trust domain | Node preparation | One value in the node user data, the site spec and the install values. If the site spec leaves it unset, nvkectl uses nvkectl-bootstrap.nke.local, which does not match your nodes. |
| Node CPU architecture | Image build | The node image and the SPIRE TPM attestor checksum are per architecture. |
| Workload cluster Container Network Interface (CNI) plugin and networks | Cluster creation | ovn-kubernetes. Pod and service ranges default to 192.168.0.0/16 and 10.96.0.0/12. |
| Workload cluster etcd encryption | Cluster creation | etcdEncrypted has no default. You can turn encryption on later, never off. |
| Workload cluster API VIP | Cluster creation | Without one, or a controlPlaneEndpoint that you operate yourself, the control plane has one node that you cannot scale, upgrade or replace. Adding a VIP means recreating the cluster. |
| NICo identifiers | Cluster or node pool creation | A cluster's orgID, siteID and vpcID, and a node pool's instanceTypeID, InfiniBand partition and NVLink logical partition. |
| Releases | When applied | MachineImage, ClusterRelease and NodePoolRelease resources are immutable. To change an image or its user data, publish a release with a new name. |
Fill in your values
Each placeholder has the same name on the page that uses it. Keep credentials in your secret store, not in this list.
Management cluster
| Value | Placeholder or field | Used on | Your value |
|---|---|---|---|
| Cluster name, a lowercase RFC 1123 label | <CLUSTER_NAME> |
Bootstrap, Install, Secure the API, Observe | |
| Each node's name, IP address and TPM endorsement-key (EK) thumbprint | hosts.csv columns name, ip, tpm_ek_thumbprint; <CP_01_EK_THUMBPRINT> and so on |
Prepare nodes, Bootstrap | |
Kubernetes version, without a leading v |
<K8S_VERSION> |
Prepare nodes, Bootstrap | |
| Kubernetes API VIP | <API_VIP> |
Bootstrap | |
| Management address | <MANAGEMENT_ADDRESS> |
Install, Secure the API, Create, Manage node pools, Observe | |
| Pod and service networks | <POD_CIDR>, <SERVICE_CIDR> |
Bootstrap | |
| Memory reserved for the system | <RESERVED_MEMORY> |
Bootstrap | |
| Address the nodes use to reach the bootstrap host | <BOOTSTRAP_HOST_IP> |
Prepare nodes | |
| SPIFFE trust domain | <TRUST_DOMAIN> |
Prepare nodes, Bootstrap, Install | |
SPIRE CA certificate and key files, passed as NVKECTL_SPIRE_CA_CERT_FILE and NVKECTL_SPIRE_CA_KEY_FILE with spire.upstreamCA: true in the site spec; the certificate in PEM |
<CA_CERT_PATH>, <CA_KEY_PATH>; <SPIRE_CA_CERT_PEM> |
Bootstrap, Install; Prepare nodes |
Registries and images
| Value | Placeholder | Used on | Your value |
|---|---|---|---|
| Registry host and namespace | <REGISTRY_HOST>, <NAMESPACE> |
Build, Bootstrap, Install | |
| Registry account that can push | <REGISTRY_USER>, <REGISTRY_TOKEN> |
Build | |
NVKE release tag, such as v0.23.1 |
<NVKE_RELEASE> |
Build, Bootstrap, Install | |
| Optional NVKR release description; see Install the management plane | release.json |
Install | |
| Controller image reference | <CONTROLLER_IMAGE> |
Bootstrap; Install without a release | |
| Provisioned infrastructure provider image | <PROVISIONED_PROVIDER_IMAGE> |
Bootstrap | |
| Profile content image reference | images.profiles in the stack config |
Install without a release | |
| Node provisioning configuration files; see Register node images for provisioning | node-config/ |
After Install |
NICo
| Value | Placeholder | Used on | Your value |
|---|---|---|---|
| API endpoint | <NICO_ENDPOINT> |
Install, Configure NICo | |
| Organization ID | <NICO_ORG_ID> |
Install, Configure NICo, Create | |
| API token | NVKECTL_NICO_TOKEN |
Install | |
| API name | <NICO_API_NAME> |
Install, Configure NICo | |
| Site ID and VPC ID | <NICO_SITE_ID>, <NICO_VPC_ID> |
Create | |
| Instance type IDs for control-plane and worker nodes | <CP_INSTANCE_TYPE_ID>, <WORKER_INSTANCE_TYPE_ID> |
Create, Manage node pools | |
| VPC prefix IDs, or subnet IDs | <VPC_PREFIX_ID> |
Create, Manage node pools | |
| SSH key group ID, optional | <SSH_KEY_GROUP_ID> |
Create |
Management plane and identity provider
| Value | Placeholder | Used on | Your value |
|---|---|---|---|
| Login account written into every workload cluster node's user data, and its password | NVKECTL_NODE_USER, NVKECTL_NODE_PASSWORD |
Install | |
| Database password, chosen once and kept in your secret manager | NVKECTL_DATABASE_PASSWORD |
Install | |
| Issuer URL | <ISSUER_URL> |
Secure the API | |
| Signing-key URL | <JWKS_URI> |
Secure the API | |
OIDC client ID for nvkectl |
<CLIENT_ID> |
Secure the API | |
| Token audience | <AUDIENCE> |
Secure the API | |
| Group allowed to call the API | <ADMITTED_GROUP> |
Secure the API | |
Extra scopes your IdP needs to release the groups claim, if any |
<SCOPE> |
Secure the API | |
NVKE API base address, http://<MANAGEMENT_ADDRESS>:30080 |
<API_URL> |
Secure the API, Manage node pools | |
| A JWT from your IdP, when API authentication is on | <TOKEN> |
Create, Manage node pools, Observe, Troubleshoot |
Each workload cluster
The workload cluster pages name each cluster <WORKLOAD_CLUSTER>. Create a workload cluster reuses <K8S_VERSION> and <API_VIP>; record them separately from the management cluster's.
| Value | Placeholder or field | Your value |
|---|---|---|
| Cluster name, a lowercase DNS label of at most 55 characters | <WORKLOAD_CLUSTER> |
|
| Kubernetes version | <K8S_VERSION> |
|
| Kubernetes API VIP | <API_VIP> |
|
| Pod and service networks, if not the defaults | network.podCIDR, network.serviceCIDR |
|
| CNI | cniPlugin |
|
| etcd encryption | etcdEncrypted |
|
| Releases for the control plane and the workers | <CP_RELEASE>, <WORKER_RELEASE> |
|
| Each node pool's name | <POOL_NAME> |
Verify
Your plan is complete when every row in Fill in your values that applies to you has a value, every connection in Ports is open, and you have decided each setting in Decide before you install.