Skip to content

k8s list-namespaces

list namespaces

Description

list k8s namespaces of the given clientset

Synopsis

k8s list-namespaces
    [--site <site>]
    [--cluster <cluster>]

Arguments

site - (string)

     Site where this command will be executed
     Example: --site "site-1"
     Default: input.site      Attributes: optional

cluster - (string)

     Cluster where this command will be executed
     Example: --cluster "in-cluster"
     Default: in-cluster      Attributes: optional

Examples

Input:

x = ! k8s list-namespace --cluster "cluster1"
Output:
[
    "default"
]
Input:
! k8s list-namespace --cluster "cluster1"
Output:
NAME
default

Access Control

To use this command, you need access to the following:

Field Value
Action "read"
Service Type "k8s"
Service Instance cluster
Namespace
Object Type "namespace"
Object ID

Please see Access Control for details.