k8sgpu

by Clastix

Helm chartv1.3.0App v1.3.0Verified publisher

K8sGPU is a Virtual Kubelet implementation to access remote GPU resources

About this chart

Deploying the k8s.gpu agent in Kubernetes

k8s.gpu is a Virtual Kubelet Provider to easily access remote GPU Clouds from any Kubernetes cluster.

It's a convenient and ideal solution for scalable GPU-powered applications by connecting GPUs additional computational capacity provided by 3dy party GPU Cloud Providers.

Requirements

  • Helm 3 is required when installing the K8sGPU Agent in Kubernetes. Follow Helm’s official steps for installing helm on your particular operating system.

  • Any Kubernetes cluster 1.24+

  • A kubeconfig file accessing the remote cluster of the GPUs Provider.

Quick Start

  1. Install the Chart:
helm repo add clastix https://clastix.github.io/charts
helm repo update

helm upgrade --install k8sgpu-agent clastix/k8sgpu-agent \
    --namespace kube-system \
    --set "k8sgpuOptions.tenantName=your_tenant_name" \
    --set-file "kubeConfigSecret.content=/path/to/your/gpu-remote-cluster/kubeconfig"
  1. Upgrade the Chart
helm upgrade k8sgpu-agent clastix/k8sgpu-agent \
    --namespace kube-system \
    --set "k8sgpuOptions.tenantName=your_tenant_name" \
    --set-file "kubeConfigSecret.content=/path/to/your/gpu-remote-cluster/kubeconfig"
  1. Uninstall the Chart
helm uninstall k8sgpu-agent --namespace kube-system

Values

KeyTypeDefaultDescription
affinityobject{}Define the affinity for the k8s.gpu agent Deployment for particular setups.
autoscaling.enabledboolfalse
autoscaling.maxReplicasint100
autoscaling.minReplicasint1
autoscaling.targetCPUUtilizationPercentageint80
extraArgslist[]A list of extra arguments to add to the controller default ones.
fullnameOverridestring""
healthProbeBindAddressint8081The address the probe endpoint binds to. (default 8081)
image.pullPolicystring"IfNotPresent"Container image pull policy.
image.repositorystring"clastix/k8sgpu-agent"Container image repository.
image.tagstring""Overrides the image tag whose default is the chart appVersion.
imagePullSecretslist[]Define the image pull secret, default container image is publicly downloadable.
k8sgpuOptions.csrSignerstring"kubelet"The Virtual Kubelet certificate signer, supported values: kubelet (for kubeadm based clusters), aws. (default: kubelet)
k8sgpuOptions.tenantNamestring""Your provider Tenant name: must be configured according to your subscription.
k8sgpuOptions.tenantNamespacestring"gpu"The logic namespace of your remote workloads. (default gpu)
kubeConfigSecret.contentstring""
kubeConfigSecret.createbooltrueSpecifies whether the secret to access remote GPUs cluster should be created
kubeConfigSecret.namestring""The name of the secret to access remote GPUs cluster. If not set and create is true, a name is generated using the fullname template
livenessProbeobject{"httpGet":{"path":"/healthz","port":"healthcheck"},"initialDelaySeconds":15,"periodSeconds":20}The livenessProbe for the controller container.
loggingDevel.enabledboolfalse(string) Development Mode defaults(encoder=consoleEncoder,logLevel=Debug,stackTraceLevel=Warn). Production Mode defaults(encoder=jsonEncoder,logLevel=Info,stackTraceLevel=Error) (default false)
nameOverridestring""
nodeSelectorobject{}Define a Node Selector to force scheduling and execution on a subset of nodes.
podAnnotationsobject{}The additional pod annotations for the k8s.gpu agent Pods.
podSecurityContextobject{}The Pod security context for the k8s.gpu agent Deployment.
readinessProbeobject{"httpGet":{"path":"/readyz","port":"healthcheck"},"initialDelaySeconds":5,"periodSeconds":10}The readinessProbe for the controller container.
replicaCountint1The replicas of the k8s.gpu agent, leader election is always involved.
resourcesobject{}Assign specific resources for the k8s.gpu agent Deployment.
securityContextobject{}The security context for the k8s.gpu agent Deployment.
service.createboolfalse
service.portint80
service.typestring"ClusterIP"
serviceAccount.annotationsobject{}
serviceAccount.createbooltrue
serviceAccount.namestring""
tolerationslist[]Define a set of Tolerations to satisfy taints of specific nodes.

Maintainers

NameEmailUrl
Dario Tranchitella[email protected]
Adriano Pezzuto[email protected]

Deploy k8sgpu with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has k8sgpu on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartk8sgpu is pinned at v1.3.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply