Create Custom Resource

POST {{cbc-hostname}}/containers/v1/orgs/{{org_key}}/deploy/kubernetes_resource_definitions

Create Custom Resource

Generates a YAML definition for a Kubernetes Custom Resource for the Carbon Black Containersโ€™ CRD (as deployed by the Carbon Black Containers Operator installation). The CR definition will be hosted by CBC for some time and can be applied directly on the cluster via kubectl or similar tools.

Permissions Required

Permission (.notation name)Operation(s)
kubernetes.securityCREATE, READ, UPDATE, DELETE, EXECUTE

Request Schema

{
  "domain": "<string>",
  "sensor_version": "<string>",
  "api_host": "<string>",
  "adapter_name": "<string>",
  "gateway_host": "<string>",
  "runtime_gateway_host": "<string>",
  "agent_components": "<object>",
  "cluster_labels": "<object>"
}

See Documentation

Request Body

{"sensor_version"=>"main", "domain"=>"john:john-eks-frankfurt", "api_host"=>"defense-dev01.cbdtest.io", "adapter_name"=>"containers", "gateway_host"=>"events.myserver.dev.containers.mydomain.io", "runtime_gateway_host"=>"runtime.events.myserver.dev.containers.mydomain.io", "cluster_labels"=>{}, "agent_components"=>{"runtime_protection"=>true, "cluster_scanning"=>true}}

HEADERS

KeyDatatypeRequiredDescription
X-AUTH-TOKENstring(Required) Carbon Black Access Key
Acceptstring

RESPONSES

status: Created

{&quot;id&quot;:&quot;cr-1a8de808-71f9-454d-8435-444b4878f67a&quot;,&quot;resource_yaml&quot;:&quot;apiVersion: operator.containers.carbonblack.io/v1\nkind: CBContainersAgent\nmetadata:\n  name: cbcontainers-agent\nspec:\n  account: ABCDE12345\n  clusterName: john:john-eks-frankfurt\n  version: \&quot;main\&quot;\n  gateways:\n    apiGateway:\n      host: defense-dev01.cbdtest.io\n      adapter: containers\n    coreEventsGateway:\n      host: events.myserver.dev.containers.mydomain.io\n    hardeningEventsGateway:\n      host: events.myserver.dev.containers.mydomain.io\n    runtimeEventsGateway:\n      host: runtime.events.myserver.dev.containers.mydomain.io \n\n&quot;,&quot;resource_url&quot;:&quot;setup.test.containers.carbonblack.io/cr-1a8de808-71f9-454d-8435-444b4878f67a&quot;}