Rancher · Capability

Rancher Cluster Lifecycle Management

Workflow capability for managing the full lifecycle of Kubernetes clusters through Rancher: provisioning new clusters, inspecting cluster health and node status, managing projects and namespaces, and decommissioning clusters. Designed for platform engineers and DevOps teams automating multi-cluster infrastructure.

Run with Naftiko Cluster ManagementKubernetesMulti-ClusterPlatform EngineeringInfrastructureRancher

What You Can Do

GET
List clusters — List all clusters.
/v1/clusters
POST
Create cluster — Provision a new cluster.
/v1/clusters
GET
Get cluster — Get cluster details.
/v1/clusters/{id}
DELETE
Delete cluster — Remove a cluster from Rancher.
/v1/clusters/{id}
GET
List nodes — List all nodes across clusters.
/v1/nodes
GET
List projects — List all projects.
/v1/projects
POST
Create project — Create a new project.
/v1/projects

MCP Tools

list-clusters

List all Kubernetes clusters managed by Rancher, including their state, provider, and Kubernetes version.

read-only
get-cluster

Retrieve details for a specific Rancher-managed cluster by ID.

read-only idempotent
create-cluster

Provision a new Kubernetes cluster through Rancher. Specify name, provider, and Kubernetes version.

delete-cluster

Remove a cluster from Rancher management. This deregisters or destroys the cluster.

idempotent
list-nodes

List all nodes across Rancher-managed clusters, including hostname, state, and roles.

read-only
list-projects

List all Rancher projects, which group namespaces within clusters for tenancy and policy.

read-only
create-project

Create a new Rancher project within a cluster to organize namespaces.

APIs Used

rancher

Capability Spec

Raw ↑
naftiko: "1.0.0-alpha1"

info:
  label: "Rancher Cluster Lifecycle Management"
  description: >-
    Workflow capability for managing the full lifecycle of Kubernetes clusters through
    Rancher: provisioning new clusters, inspecting cluster health and node status,
    managing projects and namespaces, and decommissioning clusters. Designed for
    platform engineers and DevOps teams automating multi-cluster infrastructure.
  tags:
    - Cluster Management
    - Kubernetes
    - Multi-Cluster
    - Platform Engineering
    - Infrastructure
    - Rancher
  created: "2026-05-02"
  modified: "2026-05-02"

binds:
  - namespace: env
    keys:
      RANCHER_BEARER_TOKEN: RANCHER_BEARER_TOKEN
      RANCHER_HOST: RANCHER_HOST

capability:
  consumes:
    - import: rancher
      location: ./shared/rancher-management-api.yaml

  exposes:
    - type: rest
      port: 8080
      namespace: rancher-cluster-lifecycle-api
      description: "Unified REST API for Rancher cluster lifecycle management."
      resources:
        - path: /v1/clusters
          name: clusters
          description: "Kubernetes clusters managed by Rancher."
          operations:
            - method: GET
              name: list-clusters
              description: "List all clusters."
              call: "rancher.list-clusters"
              outputParameters:
                - type: object
                  mapping: "$."
            - method: POST
              name: create-cluster
              description: "Provision a new cluster."
              call: "rancher.create-cluster"
              outputParameters:
                - type: object
                  mapping: "$."

        - path: /v1/clusters/{id}
          name: cluster
          description: "Single cluster."
          operations:
            - method: GET
              name: get-cluster
              description: "Get cluster details."
              call: "rancher.get-cluster"
              with:
                id: "rest.id"
              outputParameters:
                - type: object
                  mapping: "$."
            - method: DELETE
              name: delete-cluster
              description: "Remove a cluster from Rancher."
              call: "rancher.delete-cluster"
              with:
                id: "rest.id"
              outputParameters:
                - type: object
                  mapping: "$."

        - path: /v1/nodes
          name: nodes
          description: "Cluster nodes."
          operations:
            - method: GET
              name: list-nodes
              description: "List all nodes across clusters."
              call: "rancher.list-nodes"
              outputParameters:
                - type: object
                  mapping: "$."

        - path: /v1/projects
          name: projects
          description: "Rancher projects."
          operations:
            - method: GET
              name: list-projects
              description: "List all projects."
              call: "rancher.list-projects"
              outputParameters:
                - type: object
                  mapping: "$."
            - method: POST
              name: create-project
              description: "Create a new project."
              call: "rancher.create-project"
              outputParameters:
                - type: object
                  mapping: "$."

    - type: mcp
      port: 9080
      namespace: rancher-cluster-lifecycle-mcp
      transport: http
      description: "MCP server for AI-assisted Kubernetes cluster lifecycle management via Rancher."
      tools:
        - name: list-clusters
          description: "List all Kubernetes clusters managed by Rancher, including their state, provider, and Kubernetes version."
          hints:
            readOnly: true
            openWorld: true
          call: "rancher.list-clusters"
          outputParameters:
            - type: object
              mapping: "$."

        - name: get-cluster
          description: "Retrieve details for a specific Rancher-managed cluster by ID."
          hints:
            readOnly: true
            idempotent: true
          call: "rancher.get-cluster"
          with:
            id: "tools.id"
          outputParameters:
            - type: object
              mapping: "$."

        - name: create-cluster
          description: "Provision a new Kubernetes cluster through Rancher. Specify name, provider, and Kubernetes version."
          hints:
            readOnly: false
            destructive: false
          call: "rancher.create-cluster"
          with:
            name: "tools.name"
            description: "tools.description"
            kubernetesVersion: "tools.kubernetesVersion"
            provider: "tools.provider"
          outputParameters:
            - type: object
              mapping: "$."

        - name: delete-cluster
          description: "Remove a cluster from Rancher management. This deregisters or destroys the cluster."
          hints:
            readOnly: false
            destructive: true
            idempotent: true
          call: "rancher.delete-cluster"
          with:
            id: "tools.id"
          outputParameters:
            - type: object
              mapping: "$."

        - name: list-nodes
          description: "List all nodes across Rancher-managed clusters, including hostname, state, and roles."
          hints:
            readOnly: true
            openWorld: true
          call: "rancher.list-nodes"
          outputParameters:
            - type: object
              mapping: "$."

        - name: list-projects
          description: "List all Rancher projects, which group namespaces within clusters for tenancy and policy."
          hints:
            readOnly: true
            openWorld: true
          call: "rancher.list-projects"
          outputParameters:
            - type: object
              mapping: "$."

        - name: create-project
          description: "Create a new Rancher project within a cluster to organize namespaces."
          hints:
            readOnly: false
            destructive: false
          call: "rancher.create-project"
          outputParameters:
            - type: object
              mapping: "$."