Skip to content

k8s get-configmap

describe configmap

Description

describes k8s configmap

Synopsis

k8s get-configmap
    [--site <site>]
    [--cluster <cluster>]
    [--namespace|-n <namespace>]
    <name>

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

namespace - (string)

     Kubernetes namespace
     Example: --namespace "namespace-1"
     Default: default      Attributes: optional

name - (string)

     Name of the configmap
     Example: "name-1"
     Default: _None_      Attributes: required

Examples

Input:

! k8s get-configmaps "dynamic-config"
Output:
{
  "cluster": "in-cluster",
  "namespace": "default",
  "name": "dynamic-config",
  "annotations": {
      "meta.helm.sh/release-name": "test",
      "meta.helm.sh/release-namespace": "default"
  },
  "labels": {
      "app.kubernetes.io/instance": "test",
      "app.kubernetes.io/managed-by": "Helm",
      "app.kubernetes.io/version": "1.12.0",
      "helm.sh/chart": "test-0.12.0"
  },
  "data": {
      "dynamic_config.yaml": ""
  }
}

Access Control

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

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

Please see Access Control for details.