ves-io-schema-k8s_cluster_role_binding-API-Get

Examples of getting k8sclusterrole_binding

Usecase:

Get role-binding-1 from current namespace

Request using vesctl:

vesctl configuration get k8s_cluster_role_binding role-binding-1 --namespace system

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: role-binding-1
  namespace: system
referringObjects: []
resourceVersion: "437"
spec:
  k8sClusterRole:
    name: k8s-cluster-role-1
    namespace: system
    tenant: acmecorp
  subjects:
  - user: user1@example.com
status: []
systemMetadata:
  creationTimestamp: "2021-08-25T09:03:14.092412677Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: b179e0f8-2e1c-4812-b8d9-bc11b9b4608a

Request using curl:

curl -X 'GET' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build970361017_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/system/k8s_cluster_role_bindings/role-binding-1?response_format=0'

curl response:

HTTP/1.1 200 OK
Content-Length: 935
Content-Type: application/json
Date: Wed, 25 Aug 2021 09:03:14 GMT
Vary: Accept-Encoding

{
  "object": null,
  "create_form": null,
  "replace_form": null,
  "resource_version": "437",
  "metadata": {
    "name": "role-binding-1",
    "namespace": "system",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "b179e0f8-2e1c-4812-b8d9-bc11b9b4608a",
    "creation_timestamp": "2021-08-25T09:03:14.092412677Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "k8s_cluster_role": {
      "tenant": "acmecorp",
      "namespace": "system",
      "name": "k8s-cluster-role-1"
    },
    "subjects": [
      {
        "user": "user1@example.com"
      }
    ]
  },
  "status": [
  ],
  "referring_objects": [
  ]
}