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: "725"
spec:
  k8sClusterRole:
    name: k8s-cluster-role-1
    namespace: system
    tenant: acmecorp
  subjects:
  - user: user1@example.com
status: []
systemMetadata:
  creationTimestamp: "2022-01-12T14:49:02.782056400Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: 2ec51892-488f-4fcf-a5d5-9dfaefb45ac6

Request using curl:

curl -X 'GET' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build038462651_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, 12 Jan 2022 14:49:02 GMT
Vary: Accept-Encoding

{
  "object": null,
  "create_form": null,
  "replace_form": null,
  "resource_version": "725",
  "metadata": {
    "name": "role-binding-1",
    "namespace": "system",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "2ec51892-488f-4fcf-a5d5-9dfaefb45ac6",
    "creation_timestamp": "2022-01-12T14:49:02.782056400Z",
    "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": [
  ]
}