k8s_client.views

Subpackages

Submodules

Package Contents

Functions

resource_not_found(e)

is_json(myjson)

get_pods([context_name, node_name])

Get pods list

resource_not_found(e)

is_json(myjson)

get_nodes([context_name])

Get nodes list

resource_not_found(e)

is_json(myjson)

get_contexts()

Get contexts list

get_context(context_name)

Get the context info

get_context_busy_jobs(context_name)

Get the info of the busy jobs of the provided context

resource_not_found(e)

is_json(myjson)

get_roles([name])

Get roles list

resource_not_found(e)

is_json(myjson)

get_groups([name])

Get groups list

post_group()

Create a new group

delete_group([id])

Delete a group

update_group([id])

updates a group

resource_not_found(e)

is_json(myjson)

get_users([username])

Get users list

post_user()

Create a new user

delete_user([username])

Delete an user

update_user([username])

updates an user

update_user_password([username])

updates an user

resource_not_found(e)

is_json(myjson)

login_user()

Login an user

uninstall_completed_charts_for_user([username])

DEPRECATED!

get_user_contexts([username])

Get user contexts list

get_user_files([username, filename])

Get user files list

get_user_file_content([username, filename])

Get user file content

get_user_folder_content([username, foldername])

Get user folder content

upload_file_for_user_full([username])

Upload a file for a user

upload_file_part_for_user([username])

Upload a part of a file for a user

delete_file_for_user([username, file_full_path])

Delete a file for an user

delete_folder_for_user([username, file_full_path])

Delete a folder for an user

get_user_image_tags([username, image_id])

Get user image tags list from the Docker registry

get_user_images([username, id])

Get user images list from the DB

post_user_image([username])

Create a new user image

put_user_image([username, image_id])

Updates an existing user image

delete_user_image([username, image_id])

Delete Image for user

upload_file_for_job([username, job_uuid])

Upload a file for a reserved job

start_job([username, job_uuid])

Start a reserved job

kill_job([username, job_uuid])

Kills a running job

cancel_job([username, job_uuid])

Cancel a pending job

delete_job([username, job_uuid])

Deletes a job

get_jobs([username, limit, offset])

Get user jobs list

get_jobs_count([username])

Get user jobs count

post_jobs([username])

Creates a new job

get_user_logs([username, cluster_uri, filename, ...])

Get user logs list

get_user_logs_size([username, cluster_uri, filename])

Get user log file size

resource_not_found(e)

is_json(myjson)

get_k8s_config_clusters()

Get clusters list from k8s config

get_k8s_config_cluster(cluster_name)

Use the provided cluster

post_k8s_config_cluster()

Save k8s config cluster

put_k8s_config_cluster(cluster_name)

Update k8s config cluster

delete_k8s_config_cluster(cluster_id)

Deletes the provided cluster

get_k8s_config_kube_users()

Get kube_users list from k8s config

get_k8s_config_kube_user(kube_user_name)

Use the provided kube_user

post_k8s_config_kube_user()

Save k8s config kube_user

put_k8s_config_kube_user(kube_user_name)

Update k8s config kube_user

delete_k8s_config_kube_user(kube_user_id)

Deletes the provided kube_user

get_k8s_config_contexts()

Get contexts list from k8s config

get_k8s_config_context(context_name)

Use the provided context

post_k8s_config_context()

Save k8s config context

put_k8s_config_context(context_name)

Update k8s config context

delete_k8s_config_context(context_id)

Deletes the provided context

get_k8s_config_servers()

Get servers list from k8s config

get_k8s_config_server(server_name)

Use the provided server

post_k8s_config_server()

Save k8s config server

put_k8s_config_server(server_name)

Update k8s config server

delete_k8s_config_server(server_id)

Deletes the provided server

get_is_alive()

Used to check if the website is alive

site_map()

Returns the site map endpoints list

resource_not_found(e)

is_json(myjson)

Attributes

file_folder

resource_managers

log

file_folder

resource_managers

log

file_folder

resource_managers

log

file_folder

resource_managers

log

file_folder

resource_managers

log

file_folder

resource_managers

log

file_folder

resource_managers

log

file_folder

resource_managers

log

file_folder

resource_managers

log

k8s_client.views.file_folder
k8s_client.views.resource_managers
k8s_client.views.log
k8s_client.views.resource_not_found(e)
k8s_client.views.is_json(myjson)
k8s_client.views.get_pods(context_name=None, node_name=None)

Get pods list

Parameters

"context_name": string (optional)

The name of the context of which showing the pods. if value is None the default context name will be used.

"node_name": string (optional)

The name of the node inside the context of which showing the pods.

Returns

  • JSON containing the full list of pods of the default context if context_name is None and node_name is None

  • JSON containing the full list of pods of the specified context if context_name is a <valid value> and node_name is None

  • JSON containing the full list of pods of the node of the specified context if context_name is a <valid value> and node_name is a <valid value>

  • Error message with return code 500 if context_name is NOT a <valid value>

  • JSON containing empty pods list if node_name is NOT a <valid value>

k8s_client.views.file_folder
k8s_client.views.resource_managers
k8s_client.views.log
k8s_client.views.resource_not_found(e)
k8s_client.views.is_json(myjson)
k8s_client.views.get_nodes(context_name=None)

Get nodes list

Parameters

"context_name": string (optional)

The name of the context of which showing the nodes. if value is None the default context name will be used.

Returns

  • [code: 200] JSON containing the full list of nodes of the default context if context_name is None `

  • [code: 200] JSON containing the full list of nodes of the specified context if context_name is a <valid value>

  • [code: 500] Error message if context_name is NOT a <valid value>

k8s_client.views.file_folder
k8s_client.views.resource_managers
k8s_client.views.log
k8s_client.views.resource_not_found(e)
k8s_client.views.is_json(myjson)
k8s_client.views.get_contexts()

Get contexts list

Parameters

NONE

Returns

  • [code: 200] list [dict]

    JSON containing the full contexts

k8s_client.views.get_context(context_name)

Get the context info

Parameters

"context_name": string (optional)

The name of the context of which having the data.

Returns

  • [code: 200] dict

    JSON containing the data of the default context if context_name is a <valid value> `

  • [code: 404] string

    Error message if context_name is NOT a <valid value>

k8s_client.views.get_context_busy_jobs(context_name)

Get the info of the busy jobs of the provided context

Parameters

"context_name": string (optional)

The name of the context of which having the data.

Returns

  • [code: 200] dict

    JSON containing the data of the default context if context_name is a <valid value> `

  • [code: 404] string

    Error message if context_name is NOT a <valid value>

k8s_client.views.file_folder
k8s_client.views.resource_managers
k8s_client.views.log
k8s_client.views.resource_not_found(e)
k8s_client.views.is_json(myjson)
k8s_client.views.get_roles(name=None)

Get roles list

Parameters

"name": string (optional)

The name of the role to search.

Returns

  • JSON containing the full list of roles if name is None

  • JSON containing the details of the specified role if name is a <valid name>

  • Error message with return code 404 if name is NOT a <valid name>

k8s_client.views.file_folder
k8s_client.views.resource_managers
k8s_client.views.log
k8s_client.views.resource_not_found(e)
k8s_client.views.is_json(myjson)
k8s_client.views.get_groups(name=None)

Get groups list

Parameters

"name"string (optional)

The name of the group of which showing the details.

Returns

  • [code: 200] JSON containing the full list of groups if _name is None

  • [code: 200] JSON containing the detail of the specified group if name is a <valid value>

  • [code: 404] Error message if name is NOT a <valid value>

Notes

To each returned group will be added the context details

Examples

>>> [
        {
            "contexts": [
                {
                    "cluster_id": 1,
                    "cost": 0,
                    "id": 1,
                    "kubeuser_id": 1,
                    "max_cores_for_single_job": 105,
                    "name": "context.dev.k8s.master.dafni.hydra.org.uk",
                    "namespace": "default"
                }
            ],
            "id": 1,
            "name": "umwrg"
        }
    ]
k8s_client.views.post_group()

Create a new group

Parameters

Request Bodyjson
JSON containing data for the group:
"name"string

The name of the group to create

"contexts"list [dict]

List of dictionaries of the contexts to attach to the group, eventually empty It can contain the name or the id of the contexts. The name has higher priority, meaning if it is defined, the id is ignored If the context is not found, the group will be inserted anyway without contexts

Returns

  • [code: 409] Error message if name is already inside the DB

  • [code: 406] Error message if INPUT is NOT a <valid json>

  • [code: 200] Empty array if INPUT is valid

Examples

>>> Body = {
    "name": "test5",
    "contexts": [{"id":1}]
}
>>> Body = {
    "name": "test15",
    "contexts": [{"name":"context-test"}]
}
k8s_client.views.delete_group(id=None)

Delete a group

Parameters

"id": int

The id of the group to delete

Returns

  • Error message with return code 409 if there is an integrity error

  • Error message with return code 404 if id is NOT a <valid value>

  • JSON containing the deleted group id with return code 200 if INPUT is valid

k8s_client.views.update_group(id=None)

updates a group

Parameters

"id"int

The id of the group to update

Request Bodyjson
JSON containing data for the group:
"name": string

The name of the group to update

"contexts"list [dict]

List of dictionaries of the contexts to attach to the group, eventually empty It can contain the name or the id of the contexts. The name has higher priority, meaning if it is defined, the id is ignored If the context is not found, the group will be inserted anyway without contexts

Returns

  • [code: 404] Error message if id is not inside the DB

  • [code: 406] Error message if INPUT is NOT a <valid json>

  • [code: 409] Error message if there is an integrity error

  • [code: 200] Empty array if INPUT is valid

Examples

>>> Body = {
    "name": "test5",
    "contexts": [{"id":1}]
}
>>> Body = {
    "name": "test15",
    "contexts": [{"name":"context-test"}]
}
k8s_client.views.file_folder
k8s_client.views.resource_managers
k8s_client.views.log
k8s_client.views.resource_not_found(e)
k8s_client.views.is_json(myjson)
k8s_client.views.get_users(username=None)

Get users list

k8s_client.views.post_user()

Create a new user

k8s_client.views.delete_user(username=None)

Delete an user

k8s_client.views.update_user(username=None)

updates an user

k8s_client.views.update_user_password(username=None)

updates an user

k8s_client.views.file_folder
k8s_client.views.resource_managers
k8s_client.views.log
k8s_client.views.resource_not_found(e)
k8s_client.views.is_json(myjson)
k8s_client.views.login_user()

Login an user

Parameters

Request Bodyjson
JSON containing data for the data:
"username": string,

Name of the owner user to login

"password": string,

Password of the user

Returns

  • [code: 404] Error message if:
    • username is NOT inside the DB

    • password is NOT valid for the username

  • [code: 200] dict

    if INPUT is valid, with keys:

    "email"

    User email (str)

    "first_name"

    User first name (str)

    "groups"

    User groups list (list [dict [ "id" (str), "name" (str) ] ])

    "id"

    User id (int)

    "last_name"

    User last name (str)

    "roles"

    User roles list (list [dict [ "id" (str), "name" (str) ] ])

    "tokens"

    User tokens (` dict` [ "access" (str), "refresh" (str) ] )

    "username"

    User username (str)

k8s_client.views.uninstall_completed_charts_for_user(username=None)

DEPRECATED!

Uninstalls the completed charts

Parameters

"username": string, optional

Name of the owner user for which to upload the file

Body parameters

"force_restart_errored_pods": boolean

Force the system to restart the pods in error

Returns

  • [code: 404] Error message if:
    • username is NOT inside the DB

  • [code: 200] OK

    if the job is in reserved status

k8s_client.views.get_user_contexts(username=None)

Get user contexts list

Parameters

"username": string, optional

Name of the owner user for which to get the contexts

Returns

  • [code: 404] Error message if:
    • username is NOT inside the DB

  • [code: 200] list [dict], otherwise

    Each dict items contains:

    "cluster_id": int

    ID of the kube config cluster

    "cost": int

    Contains the cost for CPU for second of the cluster

    "id": int

    ID of the kube config context

    "kubeuser_id": int

    ID of the kube config user

    "max_cores_for_single_job": int

    Max number of cores usable for a job in MPI inside the cluster

    "name": string

    Name of the context

    "namespace": string

    Name of the namespace to use

k8s_client.views.get_user_files(username=None, filename=None)

Get user files list

Parameters

"username": string

Name of the owner user for which to get the files list

Query line parameters

  • "cluster_uri"string

    Name of the cluster where to look for the files. It corresponds to a folder on the main machine where file are synchronized

  • "relative_path"string, optional

    The relative path from the root folder of the cluster to be used

  • "filename"string

    The name of the file to view the details

  • "foldername"string

    The name of the folder to list the details

Returns

  • [code: 404] Error message if:
    • username is NOT inside the DB

  • [code: 406] Error message if:
    • cluster_uri is NOT provided

  • [code: 200] list [dict], otherwise

    Each dict items contains: - "name" : string

    Name of the item of the dir list

    • "is_dir"boolean

      Indicates if the path refers to a file or to a folder

    • "size"int

      Indicates the size if the item is a file. If the item is a folder it is always 0.

    • "content"int

      Always 0.

    • "creation_time"datetime

      Datetime of file/folder creation

    • "modified_time"datetime

      Datetime of file/folder update

k8s_client.views.get_user_file_content(username=None, filename=None)

Get user file content

Parameters

"username": string

Name of the owner user for which to get the file content

Query line parameters

  • "cluster_uri"string

    Name of the cluster from where download the files content It corresponds to a folder on the main machine where file are synchronized

  • "relative_path"string, optional

    The relative path from the root folder of the cluster to be used

  • "filename"string

    The name of the file to download

Returns

  • [code: 404] Error message if:
    • username is NOT inside the DB

    • The file has not been found

  • [code: 406] Error message if:
    • cluster_uri is NOT provided

    • relative_path is NOT provided

    • filename is NOT provided or contains not allowed chars

  • [code: 200] bytes otherwise

    the content of the file

k8s_client.views.get_user_folder_content(username=None, foldername=None)

Get user folder content

Parameters

"username": string

Name of the owner user

Query line parameters

  • "cluster_uri"string

    Name of the cluster from where download the folder. It corresponds to a folder on the main machine where file are synchronized

  • "relative_path"string, optional

    The relative path from the root folder of the cluster to be used

  • "foldername"string

    The name of the folder to download

Returns

  • [code: 404] Error message if:
    • username is NOT inside the DB

  • [code: 406] Error message if:
    • cluster_uri is NOT provided

    • relative_path is NOT provided

    • foldername is NOT provided or contains not allowed chars

  • [code: 200] bytes otherwise

    the zipped content of the folder

k8s_client.views.upload_file_for_user_full(username=None)

Upload a file for a user

NOT USED

k8s_client.views.upload_file_part_for_user(username=None)

Upload a part of a file for a user

Parameters

"username": string

Name of the owner user

Body payload parameters

The endpoint is used for 3 cases:

1) speed-test "command" : speed-test "data" : blob

Data to be sent

"cluster-uri"string

Name of the cluster on which upload the data

2) Upload part "command" : upload-part "relative-path" : string

The path where to upload the file

"file-name"string

Name of the uploading file

"chunk-number": int

Counter of the chunk to be uploaded

"chunk-size"int

Size of the chunk

"chunk-data"blob

Data to be sent

"cluster-uri"string

Name of the cluster on which upload the data

3) Join parts "command" : join-parts "relative-path" : string

The path where to upload the file

"file-name"string

Name of the uploading file

"chunks-count": int

Total number the uploaded chunks

"cluster-uri"string

Name of the cluster on which upload the data

Returns

  • [code: 404] Error message if:
    • username is NOT inside the DB

  • [code: 406] Error message if:
    • cluster_uri is NOT provided

    • relative_path is NOT provided

  • [code: 200] list otherwise

    The result of the command

k8s_client.views.delete_file_for_user(username=None, file_full_path=None)

Delete a file for an user

Parameters

"username": string

Name of the owner user

Query line parameters

  • "cluster_uri"string

    Name of the cluster from where delete the file. It corresponds to a folder on the main machine where file are synchronized

  • "file_full_path"string

    The full relative path of the file to delete

Returns

  • [code: 404] Error message if:
    • username is NOT inside the DB

  • [code: 406] Error message if:
    • cluster_uri is NOT provided

    • file_full_path is NOT provided

  • [code: 200] list otherwise

    Deleted file

k8s_client.views.delete_folder_for_user(username=None, file_full_path=None)

Delete a folder for an user

Parameters

"username": string

Name of the owner user

Query line parameters

  • "cluster_uri"string

    Name of the cluster from where delete. It corresponds to a folder on the main machine where file are synchronized

  • "file_full_path"string

    The full relative path of the folder to delete

Returns

  • [code: 404] Error message if:
    • username is NOT inside the DB

  • [code: 406] Error message if:
    • cluster_uri is NOT provided

    • file_full_path is NOT provided

  • [code: 200] list otherwise

    Deleted folder

k8s_client.views.get_user_image_tags(username=None, image_id=None)

Get user image tags list from the Docker registry

Parameters

"username": string

Name of the owner user for which to get the associated list

"image_id": int

Id of the image

Returns

  • [code: 404] Error message if:
    • username is NOT inside the DB

    • image_id is NOT inside the DB

  • [code: 200] dict [ string, list ], otherwise

    The dict contains: - "name" : string

    Full path of the image, composed by docker hub server/group/image

    • "tags"list [ string ]

      Each item contains a semver string representing an image version

k8s_client.views.get_user_images(username=None, id=None)

Get user images list from the DB

Parameters

"username": string

Name of the owner user for which to get the associated images list

Returns

  • [code: 404] Error message if:
    • username is NOT inside the DB

  • [code: 200] otherwise
    format:
    • list [dict]

      if id is None

    • dict

      if id is not None

    Each dict items contains:
    • "full_path"string

      Full path of the image, composed by docker hub server/group/image

    • "id"int

      Id of the record

    • "tags_list" : list [ semver ]

    • "wide_tags_list" : list [ dict [ id: int, image_id: int, tag: semver ] ]

k8s_client.views.post_user_image(username=None)

Create a new user image

Parameters

"username": string

Name of the owner user of the inserted image

Request Bodyjson
JSON containing data for the data:
"full_path": string

Full path of the image containing the docker registry, the group and the name itself

"tag": semver

String representing the version of the image

Returns

  • [code: 401] Error message if:

    The Bearer token is not correctly provided or it is expired

  • [code: 404] Error message if:
    • username is NOT inside the DB

  • [code: 409] Error message if:
    • The couple (full_path, tag) are already inside the DB

  • [code: 200] otherwise
    A dict contains:
    • "full_path"string

      Full path of the image, composed by docker hub server/group/image

    • "id"int

      Id of the record

    • "tag"semver

      Tag of the image

k8s_client.views.put_user_image(username=None, image_id=None)

Updates an existing user image

Parameters

"username": string

Name of the owner user of the image

"image_id": int, optional

Id of the image. Optional if the id is contained inside the request json body

Request Bodyjson
JSON containing data for the data:
"image_id": int, optional

Id of the image. If it is None, the provided parameter is used instead

"full_path": string

Full path of the image containing the docker registry, the group and the name itself

Returns

  • [code: 401] Error message if:

    The Bearer token is not correctly provided or it is expired

  • [code: 404] Error message if:
    • username is NOT inside the DB

    • image_id is NOT inside the DB

  • [code: 406] Error message if:
    • image_id not provided

  • [code: 200] otherwise
    A dict contains:
    • "full_path"string

      Full path of the image, composed by docker hub server/group/image

    • "id"int

      Id of the record

k8s_client.views.delete_user_image(username=None, image_id=None)

Delete Image for user

Parameters

"username": string

Name of the owner user of the image

Returns

  • [code: 404] Error message if:
    • username is NOT inside the DB

  • [code: 406] Error message if:
    • image_id not provided

  • [code: 200] dict [ image_id: int ] otherwise

k8s_client.views.upload_file_for_job(username=None, job_uuid=None)

Upload a file for a reserved job

Parameters

"username": string, optional

Name of the owner user for which to upload the file

"job_uuid": string

UUID of the job to upload the file

Returns

  • [code: 404] Error message if:
    • username is NOT inside the DB

    • job_uuid is NOT inside the DB or is not reserved

  • [code: 200] OK

    if the job is in reserved status

k8s_client.views.start_job(username=None, job_uuid=None)

Start a reserved job

Parameters

"username": string, optional

Name of the owner user for which to start the job

"job_uuid": string

UUID of the job to start

Returns

  • [code: 404] Error message if:
    • username is NOT inside the DB

    • job_uuid is NOT inside the DB or is not reserved

  • [code: 200] OK

    if the job is in reserved status

k8s_client.views.kill_job(username=None, job_uuid=None)

Kills a running job

Parameters

"username": string, optional

Name of the owner user for which to kill the job

"job_uuid": string

UUID of the job to kill

Returns

  • [code: 404] Error message if:
    • username is NOT inside the DB

    • job_uuid is NOT inside the DB or is not running

  • [code: 200] OK

    if the job is in running status

k8s_client.views.cancel_job(username=None, job_uuid=None)

Cancel a pending job

Parameters

"username": string, optional

Name of the owner user for which to cancel the job

"job_uuid": string

UUID of the job to cancel

Returns

  • [code: 404] Error message if:
    • username is NOT inside the DB

    • job_uuid is NOT inside the DB or is not in a pending status

  • [code: 200] list [string]

    Array containing the cancelled job if the job is in pending or reserved status

  • [code: 200] list []

    empty list otherwise

k8s_client.views.delete_job(username=None, job_uuid=None)

Deletes a job

Parameters

"username": string, optional

Name of the owner user for which to delete the job

"job_uuid": string

UUID of the job to delete

Returns

  • [code: 404] Error message if:
    • username is NOT inside the DB

    • job_uuid is NOT inside the DB

  • [code: 200] list [string]

    Array containing the deleted job

k8s_client.views.get_jobs(username=None, limit=None, offset=0)

Get user jobs list

Parameters

"username": string, optional

Name of the owner user for which to get the jobs count

"offset": int, optional

Offset of the jobs list items count. Used for pagination

"limit": int, optional

Limit of the jobs list items count. Used for pagination

Query parameters:

"image_id": int, optional

Image Id for which to get the jobs count

"context_id": int, optional

Context Id for which to get the jobs count

"status": string, optional

Status for which to get the jobs count

"image_tag_id": int, optional

Image tag Id for which to get the jobs count

"node_id": int, optional

Node Id for which to get the jobs count

"node_name": string, optional

Node Name for which to get the jobs count

"paradigm": string, optional

Paradigm for which to get the jobs count

"uuid": string, optional

UUID for which to get the jobs count

Returns

  • [code: 406] Error message if:
    • username is NOT inside the DB

  • [code: 200] int

    Count of user jobs otherwise

k8s_client.views.get_jobs_count(username=None)

Get user jobs count

Parameters

"username": string,

Name of the owner user for which to get the jobs count

Returns

  • [code: 406] Error message if:
    • username is NOT inside the DB

  • [code: 200] int

    Count of user jobs otherwise

k8s_client.views.post_jobs(username=None)

Creates a new job

Parameters

Request Bodyjson
JSON containing data for the data:
"cores_to_use": int

Number of cores to use to run the application

"context_name": string

Name of the context to use to run the application

"docker_image_name": string

Name of the image representing the application to run

"docker_image_tag"string,

Version of the image representing the application to run. Semver

"username": string,

Name of the owner user to use to run the application

"paradigm": string,

Paradigm to use. Values allowed: mpi | openmp

"env_variables": string

String representing the list of variables to pass to the application. The list will be of the form “name1=value1, …, nameK=valueK” All the variables will be instanced inside the environment where the application runs

"new_job_status"string, optional
  • String representing the status of the new job. Default is “pending”

  • Accepted values: pending, reserved

Returns

  • [code: 406] Error message if:
    • context_name is NOT inside the DB

    • paradigm is NOT valid

    • username is NOT inside the DB

    • cores_to_use is a number that overcomes the available cores for the selected context

    • new_job_status is NOT valid

  • [code: 200] dict [str, str]

    if INPUT is valid

Examples

>>> Body = {
    "cores_to_use": 30,
    "context_name": "context.dev.k8s.master.dafni.hydra.org.uk",
    "docker_image_name": "umwrg/openmp-test-2022",
    "docker_image_tag" : "0.0.12",
    "username": "a86302gb",
    "paradigm": "openmp",
    "env_variables": "API_USER=pippo, NP=75"
}
Returns {
    "job_uuid": "187fe2b9-5003-406f-8bd5-7a7931752e7d",
    "log_file_name": "a86302gb.187fe2b9-5003-406f-8bd5-7a7931752e7d.log"
}
k8s_client.views.get_user_logs(username=None, cluster_uri=None, filename=None, lines_count=None)

Get user logs list

k8s_client.views.get_user_logs_size(username=None, cluster_uri=None, filename=None)

Get user log file size

k8s_client.views.file_folder
k8s_client.views.resource_managers
k8s_client.views.log
k8s_client.views.resource_not_found(e)
k8s_client.views.is_json(myjson)
k8s_client.views.get_k8s_config_clusters()

Get clusters list from k8s config

k8s_client.views.get_k8s_config_cluster(cluster_name)

Use the provided cluster

k8s_client.views.post_k8s_config_cluster()

Save k8s config cluster

k8s_client.views.put_k8s_config_cluster(cluster_name)

Update k8s config cluster

k8s_client.views.delete_k8s_config_cluster(cluster_id)

Deletes the provided cluster

k8s_client.views.get_k8s_config_kube_users()

Get kube_users list from k8s config

k8s_client.views.get_k8s_config_kube_user(kube_user_name)

Use the provided kube_user

k8s_client.views.post_k8s_config_kube_user()

Save k8s config kube_user

k8s_client.views.put_k8s_config_kube_user(kube_user_name)

Update k8s config kube_user

k8s_client.views.delete_k8s_config_kube_user(kube_user_id)

Deletes the provided kube_user

k8s_client.views.get_k8s_config_contexts()

Get contexts list from k8s config

k8s_client.views.get_k8s_config_context(context_name)

Use the provided context

k8s_client.views.post_k8s_config_context()

Save k8s config context

k8s_client.views.put_k8s_config_context(context_name)

Update k8s config context

k8s_client.views.delete_k8s_config_context(context_id)

Deletes the provided context

k8s_client.views.get_k8s_config_servers()

Get servers list from k8s config

k8s_client.views.get_k8s_config_server(server_name)

Use the provided server

k8s_client.views.post_k8s_config_server()

Save k8s config server

k8s_client.views.put_k8s_config_server(server_name)

Update k8s config server

k8s_client.views.delete_k8s_config_server(server_id)

Deletes the provided server

k8s_client.views.get_is_alive()

Used to check if the website is alive

Parameters

NONE

Returns

  • [code: 200] {“status”: “alive”}

k8s_client.views.site_map()

Returns the site map endpoints list

Parameters

NONE

Returns

  • [code: 200] JSON containing the full list of API REST endpoints

k8s_client.views.file_folder
k8s_client.views.resource_managers
k8s_client.views.log
k8s_client.views.resource_not_found(e)
k8s_client.views.is_json(myjson)