Skip to content
This repository was archived by the owner on Jul 10, 2024. It is now read-only.
This repository was archived by the owner on Jul 10, 2024. It is now read-only.

[DESIGN] Submarine CLI need to support k8s native connection #955

@cdmikechen

Description

@cdmikechen

Submarine CLI currently only supports connection based on REST.
If we have connected remote k8s cluster or deployed a local minikube, we should be able to directly access the submarine server through k8s client for data interaction.

For example. We deploy submarine by a CR with submarine operator, so Submarine CLI can get the deployment / pod information of submarine server through submarine customized resources. In this way, we can get relevant information about submarine/notebook in a more cloud native way.

Config

This is submarine client config by using submarine config list

{                                                          
   "connection": {                                          
     "hostname": "localhost",                               
     "port": 32080                                          
   }                                                         
} 

We can change this config Native Mode like this:

{
  "type": "native",
  "connection": {
    "operator": "submarine-example"
  }
}

or

TYPE:     native
CURRENT   CONNECTION            NAMESPACE
*         submarine-example-1   default
          submarine-example-2   test

If we have just one submarine server by oprator, we can set this CR default.

Design

The design idea is very simple ~
Data interaction based on native mode can directly call k8s client API to execute commands in pod. We can use java command (like submarine-k8s-submmiter jars)/ REST to get any information we want in pod.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions