Install Nova
This document describes how to install the Nova control plane and Nova agents.
Prerequisites
- At least 2 Kubernetes clusters up and running. One cluster will be the hosting cluster where nova control plane runs. Other clusters will be workload clusters that are managed by the nova control plane.
- Installed and configured
kubectl
- Nova cannot be deployed to an Autopilot GKE cluster. Please validate that you are deploying to a non-Autopilot cluster.
- Nova control plane uses etcd as a backing store, so hosting cluster must have storage provisioner.
Install novactl
Novactl is a part of release tarball. In case you don't have a tarball, you can download and install it as kubectl plugin:
First, check available pre-built binaries for the latest release:
$ curl -s https://api.github.com/repos/elotl/novactl/releases/latest | jq -r '.assets[].browser_download_url'
https://github.com/elotl/novactl/releases/download/nova-v0.6.0/novactl-darwin-amd64-v0.6.0-trial
https://github.com/elotl/novactl/releases/download/nova-v0.6.0/novactl-darwin-arm64-v0.6.0-trial
https://github.com/elotl/novactl/releases/download/nova-v0.6.0/novactl-linux-386-v0.6.0-trial
https://github.com/elotl/novactl/releases/download/nova-v0.6.0/novactl-linux-amd64-v0.6.0-trial
https://github.com/elotl/novactl/releases/download/nova-v0.6.0/novactl-linux-arm64-v0.6.0-trial
Pick the one matching your OS / ARCH, download it, make it executable and then install as a kubectl plugin:
$ curl -L https://github.com/elotl/novactl/releases/download/nova-v0.6.0/novactl-linux-amd64-v0.6.0-trial -o novactl
chmod +x ./novactl
sudo ./novactl kubectl-install
Test if it works:
$ kubectl nova --help
.
Usage:
novactl [command]
Available Commands:
create Create new nova component
get get resource
help Help about any command
kubectl-install Install CLI as kubectl plugin
logs Print the logs for a container in a pod
status check status of Nova
uninstall Uninstall Nova component
Flags:
-h, --help help for novactl
-v, --version version for novactl
Use "novactl [command] --help" for more information about a command.
Deploy
To deploy Nova Control Plane to one cluster and use another as a workload cluster, make sure you have at least two contexts in your kubeconfig.
$ kubectl config get-contexts
CURRENT NAME CLUSTER AUTHINFO NAMESPACE
* nova-example-agent-1 nova-example-agent-1 nova-example-agent-1
nova-example-agent-2 nova-example-agent-2 nova-example-agent-2
nova-example-control-plane nova-example-control-plane nova-example-control-plane
Install nova control plane
Note: The Nova Control Plane will be deployed to the elotl namespace, which will be created if it does not already exist.
To deploy Nova Control Plane to nova-example-control-plane
, run:
$ kubectl nova create control-plane --context nova-example-control-plane example-nova-cp
Installing Nova Control Plane... 🪄
Nova Control Plane components installed! 🚀
Nova kubeconfig is stored at /Users/example-user/.nova/nova-cp/nova-kubeconfig
To interact with Nova, run:
export KUBECONFIG=~/.kube/config:/Users/example-user/.nova/nova-cp/nova-kubeconfig
kubectl get cluster --context nova
Install nova agent into workload cluster
Each workload cluster needs a Nova agent. The Nova agent will be deployed to the elotl namespace. Before deploying Nova agent, you need to ensure that the Nova's init-kubeconfig is present in the elotl namespace.
Let's create elotl
namespace first:
$ kubectl --context=nova-example-agent-1 create namespace elotl
and copy init-kubeconfig from Nova Control Plane to workload cluster:
$ kubectl --context=nova get secret -n elotl nova-cluster-init-kubeconfig -o yaml | kubectl --context=nova-example-agent-1 apply -f -
To connect a workload cluster to Nova, we will deploy Nova agent to nova-example-agent-1
with "my-workload-cluster-1" identifier:
$ kubectl nova create agent --context nova-example-agent-1 my-workload-cluster-1
Installing Nova Agent... 🪄
Nova Agent components installed! 🚀
If you have a second cluster, run the same commands with a different cluster and cluster name, e.g.,
$ kubectl --context=nova-example-agent-2 create namespace elotl
kubectl --context=nova get secret -n elotl nova-cluster-init-kubeconfig -o yaml | kubectl --context=nova-example-agent-2 apply -f -
kubectl nova create agent --context nova-example-agent-2 my-workload-cluster-2
Installing Nova Agent... 🪄
Nova Agent components installed! 🚀
Post installation check
We should now see the newly added workload cluster registered in Nova Control Plane:
$ kubectl --context=nova get clusters
NAME K8S-VERSION REGION READY
my-workload-cluster-1 1.22 us-central1 True
my-workload-cluster-2 1.22 us-central1 True
To get more insight into the clusters available resources:
$ kubectl --context=nova get clusters -o go-template-file=kubectl_templates/cluster_output.gotemplate
| CLUSTER NAME | K8S VERSION | CLOUD PROVIDER | REGION | STATUS |
|----------------------------------------------------------------------------------------------|
| my-workload-cluster-1 | 1.22 | gce | us-central1 | ClusterReady |
|----------------------------------------------------------------------------------------------|
| NODES |
|----------------------------------------------------------------------------------------------|
| NAME | AVAILABLE | AVAILABLE | AVAILABLE |
| | CPU | MEMORY | GPU |
| |
| gke-nova-example-agent-1-default-pool-25df6493-263w | 399m | 2332068Ki | 0 |
| gke-nova-example-agent-1-default-pool-25df6493-f9f8 | 427m | 2498615680 | 0 |
| |
| NODES' TAINTS |
| |
|----------------------------------------------------------------------------------------------|
| CLUSTER NAME | K8S VERSION | CLOUD PROVIDER | REGION | STATUS |
|----------------------------------------------------------------------------------------------|
| my-workload-cluster-2 | 1.22 | gce | us-central1 | ClusterReady |
|----------------------------------------------------------------------------------------------|
| NODES |
|----------------------------------------------------------------------------------------------|
| NAME | AVAILABLE | AVAILABLE | AVAILABLE |
| | CPU | MEMORY | GPU |
| |
| gke-nova-example-agent-2-default-pool-55fcf389-74zh | 457m | 2460060Ki | 0 |
| gke-nova-example-agent-2-default-pool-55fcf389-n77s | 359m | 2336086400 | 0 |
| gke-nova-example-agent-2-gpu-pool-950c3823-mlqq | 677m | 2354840Ki | 0 |
| |
| NODES' TAINTS |
| |
| gke-nova-example-agent-2-gpu-pool-950c3823-mlqq |
| - nvidia.com/gpu:present:NoSchedule |
|----------------------------------------------------------------------------------------------|
Uninstall Nova
Uninstall Nova Agent from Workload cluster
$ kubectl nova uninstall agent --context nova-example-agent-1 my-workload-cluster-1
Uninstall Nova Control Plane
To uninstall Nova Control Plane components, run:
$ kubectl nova uninstall control-plane --context nova-example-control-plane example-nova-cp
Default namespace is elotl
.