|
1 | 1 | # skyhook |
2 | 2 |
|
3 | | -Skyhook was developed for modifying the underlying host OS in Kubernetes clusters. Think of it as a package manager like apt/yum for linux but for whole cluster management. The package manager (Skyhook Operator) manages the lifecycle (install/configure/uninstall/upgrade) of the packages (Skyhook Custom Resource, often SCR for short). It is Kubernetes aware, making cluster modifications easy. This enables Skyhook to schedule updates around important workloads and do rolling updates. It can be used in any cluster environment: self-managed clusters, on-prem clusters, cloud clusters, etc. |
| 3 | +Skyhook was developed for modifying the underlying host OS in Kubernetes clusters. Think of it as a package manager like apt/yum for linux but for whole cluster management. The package manager (Skyhook Operator) manages the lifecycle (install/configure/uninstall/upgrade) of the packages (Skyhook Custom Resource, often SCR for short). It is Kubernetes aware, making cluster modifications easy. This enables Skyhook to schedule updates around important workloads and do rolling updates. It can be used in any cluster environment: self-managed clusters, on-prem clusters, cloud clusters, etc. |
4 | 4 |
|
| 5 | +## Quick Start |
| 6 | + |
| 7 | +### Install the operator |
| 8 | + 1. Install cert-manager `kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.15.2/cert-manager.yaml` |
| 9 | + 1. Create a secret for the operator to pull images `kubectl create secret generic node-init-secret --from-file=.dockerconfigjson=${HOME}/.config/containers/auth.json --type=kubernetes.io/dockerconfigjson -n skyhook` |
| 10 | + 1. Install the operator `helm install skyhook ./chart --namespace skyhook` |
| 11 | + |
| 12 | +### Install a package |
| 13 | +Example package using shellscript, put this in a file called `demo.yaml` and apply it with `kubectl apply -f demo.yaml` |
| 14 | +``` |
| 15 | +apiVersion: skyhook.nvidia.com/v1alpha1 |
| 16 | +kind: Skyhook |
| 17 | +metadata: |
| 18 | + labels: |
| 19 | + app.kubernetes.io/part-of: skyhook-operator |
| 20 | + app.kubernetes.io/created-by: skyhook-operator |
| 21 | + name: demo |
| 22 | +spec: |
| 23 | + nodeSelectors: |
| 24 | + matchLabels: |
| 25 | + skyhook.nvidia.com/test-node: demo |
| 26 | + packages: |
| 27 | + tuning: |
| 28 | + version: 1.1.0 |
| 29 | + image: ghcr.io/nvidia/skyhook-packages/shellscript |
| 30 | + configMap: |
| 31 | + apply.sh: |- |
| 32 | + #!/bin/bash |
| 33 | + echo "hello world" > /skyhook-hello-world |
| 34 | + sleep 5 |
| 35 | + apply_check.sh: |- |
| 36 | + #!/bin/bash |
| 37 | + cat /skyhook-hello-world |
| 38 | + sleep 5 |
| 39 | + config.sh: |- |
| 40 | + #!/bin/bash |
| 41 | + echo "a config is run" >> /skyhook-hello-world |
| 42 | + sleep 5 |
| 43 | + config_check.sh: |- |
| 44 | + #!/bin/bash |
| 45 | + grep "config" /skyhook-hello-world |
| 46 | + sleep 5 |
| 47 | +``` |
| 48 | + |
| 49 | +### Watch Skyhook apply the package |
| 50 | +``` |
| 51 | +kubectl get pods -w -n skyhook |
| 52 | +``` |
| 53 | +There will a pod for each lifecycle stage (apply, config) in this case. |
| 54 | + |
| 55 | +### Check the package |
| 56 | +``` |
| 57 | +kubectl describe skyhooks.skyhook.nvidia.com/demo |
| 58 | +``` |
| 59 | +The Status will show the overall package status as well as the status of each node |
| 60 | + |
| 61 | +### Check the annotations on the node using the label |
| 62 | +``` |
| 63 | +kubectl get nodes -o jsonpath='{range .items[?(@.metadata.labels.skyhook\.nvidia\.com/test-node=="demo")]}{.metadata.annotations.skyhook\.nvidia\.com/nodeState_demo}{"\n"}{end}' |
| 64 | +``` |
| 65 | + |
5 | 66 | ## Benefits |
6 | 67 | - The requested changes (the Packages) are native Kubernetes resources they can be combined and applied with common tools like ArgoCD, Helm, Flux etc. This means that all the tooling to manage applications can package customizations right alongside them to get applied, removed and upgraded as the applications themselves are. |
7 | 68 | - Autoscaling, with skyhook if you want to enable autoscaling on your cluster but need to modify all Nodes added to a cluster, you need something that is kubernetes aware. Skyhook as feature to make sure you nodes are ready before then enter the cluster. |
|
0 commit comments