Kubernetes · Capability

Kubernetes API — Cluster

Kubernetes API — Cluster. 7 operations. Lead operation: Kubernetes List namespaces. Self-contained Naftiko capability covering one Kubernetes business surface.

Run with Naftiko KubernetesCluster

What You Can Do

GET
Listnamespaces — Kubernetes List namespaces
/v1/api/v1/namespaces
POST
Createnamespace — Kubernetes Create a namespace
/v1/api/v1/namespaces
GET
Getnamespace — Kubernetes Get a namespace
/v1/api/v1/namespaces/{name}
PUT
Replacenamespace — Kubernetes Replace a namespace
/v1/api/v1/namespaces/{name}
DELETE
Deletenamespace — Kubernetes Delete a namespace
/v1/api/v1/namespaces/{name}
GET
Listnodes — Kubernetes List nodes
/v1/api/v1/nodes
GET
Getnode — Kubernetes Get a node
/v1/api/v1/nodes/{name}

MCP Tools

kubernetes-list-namespaces

Kubernetes List namespaces

read-only idempotent
kubernetes-create-namespace

Kubernetes Create a namespace

kubernetes-get-namespace

Kubernetes Get a namespace

read-only idempotent
kubernetes-replace-namespace

Kubernetes Replace a namespace

idempotent
kubernetes-delete-namespace

Kubernetes Delete a namespace

idempotent
kubernetes-list-nodes

Kubernetes List nodes

read-only idempotent
kubernetes-get-node

Kubernetes Get a node

read-only idempotent

Capability Spec

kubernetes-cluster.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Kubernetes API — Cluster
  description: 'Kubernetes API — Cluster. 7 operations. Lead operation: Kubernetes List namespaces. Self-contained Naftiko
    capability covering one Kubernetes business surface.'
  tags:
  - Kubernetes
  - Cluster
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    KUBERNETES_API_KEY: KUBERNETES_API_KEY
capability:
  consumes:
  - type: http
    namespace: kubernetes-cluster
    baseUri: https://kubernetes.default.svc
    description: Kubernetes API — Cluster business capability. Self-contained, no shared references.
    resources:
    - name: api-v1-namespaces
      path: /api/v1/namespaces
      operations:
      - name: listnamespaces
        method: GET
        description: Kubernetes List namespaces
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createnamespace
        method: POST
        description: Kubernetes Create a namespace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-v1-namespaces-name
      path: /api/v1/namespaces/{name}
      operations:
      - name: getnamespace
        method: GET
        description: Kubernetes Get a namespace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: replacenamespace
        method: PUT
        description: Kubernetes Replace a namespace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletenamespace
        method: DELETE
        description: Kubernetes Delete a namespace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: api-v1-nodes
      path: /api/v1/nodes
      operations:
      - name: listnodes
        method: GET
        description: Kubernetes List nodes
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: api-v1-nodes-name
      path: /api/v1/nodes/{name}
      operations:
      - name: getnode
        method: GET
        description: Kubernetes Get a node
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.KUBERNETES_API_KEY}}'
  exposes:
  - type: rest
    namespace: kubernetes-cluster-rest
    port: 8080
    description: REST adapter for Kubernetes API — Cluster. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/api/v1/namespaces
      name: api-v1-namespaces
      description: REST surface for api-v1-namespaces.
      operations:
      - method: GET
        name: listnamespaces
        description: Kubernetes List namespaces
        call: kubernetes-cluster.listnamespaces
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createnamespace
        description: Kubernetes Create a namespace
        call: kubernetes-cluster.createnamespace
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v1/namespaces/{name}
      name: api-v1-namespaces-name
      description: REST surface for api-v1-namespaces-name.
      operations:
      - method: GET
        name: getnamespace
        description: Kubernetes Get a namespace
        call: kubernetes-cluster.getnamespace
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: replacenamespace
        description: Kubernetes Replace a namespace
        call: kubernetes-cluster.replacenamespace
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletenamespace
        description: Kubernetes Delete a namespace
        call: kubernetes-cluster.deletenamespace
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v1/nodes
      name: api-v1-nodes
      description: REST surface for api-v1-nodes.
      operations:
      - method: GET
        name: listnodes
        description: Kubernetes List nodes
        call: kubernetes-cluster.listnodes
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v1/nodes/{name}
      name: api-v1-nodes-name
      description: REST surface for api-v1-nodes-name.
      operations:
      - method: GET
        name: getnode
        description: Kubernetes Get a node
        call: kubernetes-cluster.getnode
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: kubernetes-cluster-mcp
    port: 9090
    transport: http
    description: MCP adapter for Kubernetes API — Cluster. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: kubernetes-list-namespaces
      description: Kubernetes List namespaces
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: kubernetes-cluster.listnamespaces
      outputParameters:
      - type: object
        mapping: $.
    - name: kubernetes-create-namespace
      description: Kubernetes Create a namespace
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: kubernetes-cluster.createnamespace
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: kubernetes-get-namespace
      description: Kubernetes Get a namespace
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: kubernetes-cluster.getnamespace
      outputParameters:
      - type: object
        mapping: $.
    - name: kubernetes-replace-namespace
      description: Kubernetes Replace a namespace
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: kubernetes-cluster.replacenamespace
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: kubernetes-delete-namespace
      description: Kubernetes Delete a namespace
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: kubernetes-cluster.deletenamespace
      outputParameters:
      - type: object
        mapping: $.
    - name: kubernetes-list-nodes
      description: Kubernetes List nodes
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: kubernetes-cluster.listnodes
      outputParameters:
      - type: object
        mapping: $.
    - name: kubernetes-get-node
      description: Kubernetes Get a node
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: kubernetes-cluster.getnode
      outputParameters:
      - type: object
        mapping: $.