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
Download latest novactl release and install it as kubectl plugin:
$ curl -s https://api.github.com/repos/elotl/try-nova/releases/latest | grep "novactl-$(uname -s | awk '{print tolower($0)}')-$(uname -p)*" | cut -d : -f 2,3 | tr -d \" | wget -qi -
$ sudo mv novactl-$(uname -s | awk '{print tolower($0)}')-$(uname -p)* /usr/local/bin/kubectl-nova
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, which will be created if it does not already exist.
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 command with a different cluster and cluster name, e.g.,
$ 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:
$ KUBECONFIG="./nova-installer-output/nova-kubeconfig" kubectl 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:
$ KUBECONFIG="./nova-installer-output/nova-kubeconfig" kubectl 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
.