Deploying KubeDirector Applications

Deploy KubeDirector applications into HPE Ezmeral Runtime Enterprise using the KubeDirector tab of the Kubernetes Applications screen.

This article describes how to deploy KubeDirector applications using the KubeDirector tab of the Kubernetes Applications screen (see KubeDirector Tab).

For instructions on onboarding a Kubectl application, see Onboarding Applications.

If your application will use GPU resources, see also Using GPUs in Kubernetes Pods.

Deploying KubeDirector Applications

To deploy a KubeDirector application:

  1. Log into the web interface as a Member of the Kubernetes cluster within which you want to launch the application.
  2. In the main menu, select Applications to open the Kubernetes Applications screen. See The Kubernetes Applications Screen.
  3. If needed, select KubeDirector to open the KubeDirector tab.
  4. Find the tile that corresponds to the application you want to deploy, and then click the Launch button on that tile.



    The Create Application screen appears. The content of the screen varies depending on which application you are creating. The following screen is an example of the screen for a CentOSĀ 7.9 application instance:


    Create application screen for CentOS 7.9
  5. Complete the information on the form.

    To enable DataTap for this application, Enable DataTap. For information about DataTap, see About DataTaps.

  6. If needed, open the YAML file for editing by clicking Edit/Launch yaml. If you choose to edit the YAML file, you can edit some or all of the following information, as appropriate.

    • apiVersion: API to use for the pod that will be created to deploy this application.
    • Metadata name: Name of the pod that will be created to deploy this application.
    • Metadata namespace: Kubernetes namespace to use. Leave this at the default setting unless you are an advanced Kubernetes user.
      NOTE You can create KubeDirector applications that HPE Ezmeral Runtime Enterprise automatically applies to future tenants.
      If you create a KubeDirector application in one of the following namespaces, HPE Ezmeral Runtime Enterprise adds the application to the list of KubeDirector applications used in the creation of future tenants:
      • If your platform has a Spark or ML Ops license, KubeDirector applications added to the following namespaces are automatically applied to future tenants:
        • kd-apps
        • kd-mlops
        • kd-spark
      • If your platform does not have a Spark or ML Ops license, only KubeDirector applications added to the kd-apps namespace are automatically applied to future tenants.
    • Spec name: Name of the application being launched. Do not modify this value.
    • appCatalog: Source of the application being launched inside this pod. Do not modify this value.
    • Roles: Each application requires virtual nodes/containers with one or more roles. The correct name and number of roles appears in the Launch Kubernetes Applications screen by default, and the following information appears for each role:
      • id: name of the role. Do not modify this value.
      • members: number of virtual containers to create with this role. For example, members: 3 means that three virtual nodes will be created for a role.
      • Resource requests: Requested amount of memory and CPU resources to use for each container of the current role that is being created in this pod. For example, memory: "4Gi" and cpu: "2" means that each container will request 4GB of RAM and two CPU cores.
      • Resource limits: Maximum amount of memory and CPU resources that can be used by each container of the current role that is being created in this pod. For example, memory: "4Gi" and cpu: "2" means that each container can use a maximum of 4GB of RAM and two CPU cores.

      If the application will use GPU resources, additional information is required. See Deploying Applications That Use GPU Resources

  7. Click Submit.

HPE Ezmeral Runtime Enterprise returns you to the Kubernetes Applications screen. The new pod that you just created appears in the KubeDirector Running Applications table. When the Status of this pod changes to ready, then you may access the service endpoints within that pod using either the command line or the Service Endpoints tab (see Service Endpoints Tab).

CAUTION

Improper parameter modification may cause pod creation to fail or other undesirable behavior.

Deploying Applications That Use GPU Resources

If you specify a nonzero value for GPU on any HPE Ezmeral Runtime Enterprise UI screen that creates an application (such as when you create a notebook), the required environment variable settings are added to the YAML file automatically. If you edit the YAML file manually, you must ensure that the NVIDIA_DRIVER_CAPABILITIES environment variable is configured.

  • Set the NVIDIA_DRIVER_CAPABILITIES environment variable to 'compute,utility' for every role that uses a GPU.

  • Specify GPU resources in the resource requests and limits.

    For examples of specifying MIG resources, see Using GPUs in Kubernetes Pods.

For example:

apiVersion: "kubedirector.hpe.com/v1beta1"
kind: "KubeDirectorCluster"
metadata: 
  name: "centos7gpu"
  namespace: "gput"
  labels: 
    description: ""
spec: 
  app: "centos7x"
  namingScheme: "CrNameRole"
  appCatalog: "local"
  roles: 
    - 
      id: "vanilla_centos"
      members: 1
      env:
        - 
          name: "NVIDIA_DRIVER_CAPABILITIES"
          value: "compute,utility"
      resources: 
        requests: 
          cpu: "2"
          memory: "4Gi"
          nvidia.com/gpu: "1"
        limits: 
          cpu: "2"
          memory: "4Gi"
          nvidia.com/gpu: "1"

Deploying Applications in an Air-Gap Environment

If Kubernetes is deployed in an air-gap configuration (see Kubernetes Air-Gap Requirements and Air Gap Tab), then you will need to manually edit KubeDirectorApp resources, as follows:

  1. Retrieve the desired image from the bluedata Docker hub, and then upload that image to your locally-accessible repo. There are a few cases in which the path in the repository does not match the common name. For example:
    Common Name Path Name
    Jupyter notebook /kd-notebook
    Training engine (controller) /kd-training
    Training engine (REST server) /kd-api-serving
    Deployment Engine /kd-api-serving
  2. In the kd-apps namespace, change the defaultImageRepoTag and (if present) imageRepoTag parameters to identify the image on a locally-accessible repo.

For example, for the spark221e2 KubeDirector App, execute the command kubectl -n kd-apps edit kdapp spark221e2, and then modify the defaultImageRepoTag and imageRepoTag parameters.

NOTE Modifying the Kubernetes cluster in this fashion will affect the default KubeDirector app catalog for each subsequently-created tenant in that cluster.

Enabling SSH Access to KubeDirector Application Pods

To enable SSH access to KubeDirector application pods:

  1. Execute the following command to initialize and open a web terminal to connect to the pod:
    kubectl exec -it <pod name> - - /bin/bash
    For example:
    #> kubectl exec -it kdss-66ddf-0 - - /bin/bash
    pod_terminal#>passwd bluedata     ### provide password or add user using adduser -p command
    pod_terminal#>exit
  2. SSH from your web terminal or other client in the usual way by connecting to the access point displayed on the Service Endpoints tab of the Kubernetes Applications screen. See Service Endpoints Tab. For example:
    ssh bluedata@<access point> -p <port number>
    #> ssh bluedata@vm188.mycorp.net -p 10011
  3. Provide your password to complete the connection.