Skip to main content
Version: 1.15.0

Application Deployment

This topic describes the steps to deploy an application on a workspace. You can deploy an application using kubectl or Helm.

Overview

A workspace is a dedicated and logically isolated environment within a Kubernetes platform that allows users and teams to deploy, manage, and monitor their applications. It serves as a foundational unit for organizing infrastructure, access control, and resource allocation.

Workspaces provide a secure and efficient way to manage applications, ensuring that resources are appropriately allocated and that you have the necessary permissions to perform your tasks.

EGS supports CPU workloads, which require CPU resources to run and CPU workloads that do not require GPU resources. To deploy GPU workloads, you must allocate GPUs using GPU Provisioning Requests (GPRs). You can deploy both GPU and CPU workloads on a workspace.

Prerequisites

Before deploying applications on a workspace, ensure you have the following prerequisites:

1. Get Access to a Workspace

Before proceeding, ensure that you have access to the appropriate workspace. Only an administrator has the permission to manage workspaces. If you do not currently have access, contact your administrator to request it. For more information, see the Workspace Operations documentation.

2. Onboard a Namespace

To begin working within an EGS workspace, your namespace must first be onboarded. Coordinate with your cluster administrator to get the namespace onboarded. Onboarding your namespace is a required step, as it grants you the necessary access to deploy and manage applications within your designated namespace. For more information, see the Onboard Namespaces documentation.

3. Get the Kubeconfig File

To interact with the Kubernetes cluster, you must obtain the kubeconfig file associated with your workspace. Contact your cluster administrator to request access to this file. The kubeconfig file is required for authenticating with the Kubernetes API and configuring CLI tools such as kubectl.

4. GPU Allocation

To deploy workloads that require GPU resources, you must allocate GPUs using GPU Provisioning Requests (GPRs). You can do this in two ways:

  • Create a GPR with specific requirements (for example, GPU type, memory and so on) from the User Portal or work with admin to create a GPR. For more information, see Manage GPU Requests documentation.

  • Auto GPR Templates, which automatically selects an available GPR template based on the workload requirements. Work with admin to create an auto GPR. For more information, see the Manage GPR Templates documentation.

Deploy an Application on a Workspace

After you get the kubeconfig file from your admin, you can use kubectl to deploy an application on your workspace. You must deploy your application on the namespace that you have onboarded onto a workspace.

note

In addition to using kubectl, you can use Helm or other mechanisms to deploy the workload including CI/CD, Argo CD, and so on.

To deploy an application:

  1. Create a deployment YAML file with the necessary specifications, including the namespace:

    The following is an example of cuda deployment YAML file:

    apiVersion: apps/v1
    kind: Deployment
    metadata:
    name: cuda-test-new
    namespace: cuda
    labels:
    app: cuda-test-new
    spec:
    replicas: 1
    selector:
    matchLabels:
    app: cuda-test-new
    template:
    metadata:
    labels:
    app: cuda-test-new
    spec:
    hostPID: true
    nodeSelector:
    nvidia.com/gpu: "true"
    tolerations:
    - key: "nvidia.com/gpu"
    operator: "Exists"
    effect: "NoSchedule"
    containers:
    - name: cuda-sample-vector-add
    image: "nvcr.io/nvidia/k8s/cuda-sample:vectoradd-cuda12.5.0-ubi8"
    command: ["/bin/bash", "-c", "--"]
    args:
    - while true; do /cuda-samples/vectorAdd; done
    resources:
    limits:
    nvidia.com/gpu: 1
  2. Deploy the application using the following command:

    kubectl apply -f cuda-workload.yaml -n cuda
  3. Verify the deployment:

    kubectl get deployments -n cuda

View Deployed Application

You can view the details of your deployed applications using the following command:

To list all pods in the namespace:

kubectl get pods -n <your-namespace>