技能 人工智能 CoreWeave K8s环境设置与认证

CoreWeave K8s环境设置与认证

v20260423
coreweave-install-auth
本指南提供了一套完整的CoreWeave Kubernetes服务(CKS)配置流程。内容包括如何下载kubeconfig文件、设置API令牌以及使用`kubectl`命令验证GPU资源访问。适用于所有需要在裸金属GPU集群上部署AI/ML工作负载的用户。
获取技能
349 次下载
概览

CoreWeave Install & Auth

Overview

Set up access to CoreWeave Kubernetes Service (CKS). CKS runs bare-metal Kubernetes with NVIDIA GPUs -- no hypervisor overhead. Access is via standard kubeconfig with CoreWeave-issued credentials.

Prerequisites

  • CoreWeave account at https://cloud.coreweave.com
  • kubectl v1.28+ installed
  • Kubernetes namespace provisioned by CoreWeave

Instructions

Step 1: Download Kubeconfig

  1. Log in to https://cloud.coreweave.com
  2. Navigate to API Access > Kubeconfig
  3. Download the kubeconfig file
# Save kubeconfig
mkdir -p ~/.kube
cp ~/Downloads/coreweave-kubeconfig.yaml ~/.kube/coreweave

# Set as active context
export KUBECONFIG=~/.kube/coreweave

# Verify connection
kubectl get nodes
kubectl get namespaces

Step 2: Configure API Token

# CoreWeave API token for programmatic access
export COREWEAVE_API_TOKEN="your-api-token"

# Store securely
echo "COREWEAVE_API_TOKEN=${COREWEAVE_API_TOKEN}" >> .env
echo "KUBECONFIG=~/.kube/coreweave" >> .env

Step 3: Verify GPU Access

# List available GPU nodes
kubectl get nodes -l gpu.nvidia.com/class -o custom-columns=\
NAME:.metadata.name,GPU:.metadata.labels.gpu\.nvidia\.com/class,\
STATUS:.status.conditions[-1].type

# Check GPU allocatable resources
kubectl describe nodes | grep -A5 "Allocatable:" | grep nvidia

Step 4: Test with a Simple GPU Pod

# test-gpu.yaml
apiVersion: v1
kind: Pod
metadata:
  name: gpu-test
spec:
  restartPolicy: Never
  containers:
    - name: cuda-test
      image: nvidia/cuda:12.2.0-base-ubuntu22.04
      command: ["nvidia-smi"]
      resources:
        limits:
          nvidia.com/gpu: 1
  affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
          - matchExpressions:
              - key: gpu.nvidia.com/class
                operator: In
                values: ["A100_PCIE_80GB"]
kubectl apply -f test-gpu.yaml
kubectl logs gpu-test  # Should show nvidia-smi output
kubectl delete pod gpu-test

Error Handling

ErrorCauseSolution
Unable to connect to the serverWrong kubeconfigVerify KUBECONFIG path
ForbiddenMissing namespace permissionsContact CoreWeave support
No GPU nodes foundWrong node labelsCheck gpu.nvidia.com/class labels
Pod stuck PendingGPU capacity exhaustedTry different GPU type or region

Resources

Next Steps

Proceed to coreweave-hello-world to deploy your first inference service.

信息
分类 人工智能
名称 coreweave-install-auth
版本 v20260423
大小 3.35KB
更新时间 2026-04-28
语言