Portainer · Capability

PortainerCE API — kubernetes

PortainerCE API — kubernetes. 65 operations. Lead operation: Generate a kubeconfig file. Self-contained Naftiko capability covering one Portainer business surface.

Run with Naftiko Portainerkubernetes

What You Can Do

GET
Getkubernetesconfig — Generate a kubeconfig file
/v1/kubernetes/config
GET
Getallkubernetesapplications — Get a list of applications across all namespaces in the cluster. If the nodeName is provided, it will return the applications running on that node.
/v1/kubernetes/{id}/applications
GET
Getallkubernetesapplicationscount — Get Applications count
/v1/kubernetes/{id}/applications/count
POST
Deleteclusterrolebindings — Delete cluster role bindings
/v1/kubernetes/{id}/cluster-role-bindings/delete
POST
Deleteclusterroles — Delete cluster roles
/v1/kubernetes/{id}/cluster-roles/delete
GET
Getallkubernetesclusterrolebindings — Get a list of kubernetes cluster role bindings
/v1/kubernetes/{id}/clusterrolebindings
GET
Getallkubernetesclusterroles — Get a list of kubernetes cluster roles
/v1/kubernetes/{id}/clusterroles
GET
Getallkubernetesconfigmaps — Get a list of ConfigMaps
/v1/kubernetes/{id}/configmaps
GET
Getallkubernetesconfigmapscount — Get ConfigMaps count
/v1/kubernetes/{id}/configmaps/count
GET
Getkubernetescronjobs — Get a list of kubernetes Cron Jobs
/v1/kubernetes/{id}/cron-jobs
POST
Deletecronjobs — Delete Cron Jobs
/v1/kubernetes/{id}/cron-jobs/delete
GET
Getkubernetesdashboard — Get the dashboard summary data
/v1/kubernetes/{id}/dashboard
GET
Describeresource — Get a description of a kubernetes resource
/v1/kubernetes/{id}/describe
GET
Getallkubernetesevents — Gets kubernetes events
/v1/kubernetes/{id}/events
GET
Getallkubernetesingresscontrollers — Get a list of ingress controllers
/v1/kubernetes/{id}/ingresscontrollers
PUT
Updatekubernetesingresscontrollers — Update (block/unblock) ingress controllers
/v1/kubernetes/{id}/ingresscontrollers
GET
Getallkubernetesclusteringresses — Get kubernetes ingresses at the cluster level
/v1/kubernetes/{id}/ingresses
GET
Getallkubernetesclusteringressescount — Get Ingresses count
/v1/kubernetes/{id}/ingresses/count
POST
Deletekubernetesingresses — Delete one or more Ingresses
/v1/kubernetes/{id}/ingresses/delete
GET
Getkubernetesjobs — Get a list of kubernetes Jobs
/v1/kubernetes/{id}/jobs
POST
Deletejobs — Delete Jobs
/v1/kubernetes/{id}/jobs/delete
GET
Getkubernetesmaxresourcelimits — Get max CPU and memory limits of all nodes within k8s cluster
/v1/kubernetes/{id}/max-resource-limits
GET
Getapplicationsresources — Get the total resource requests and limits of all applications
/v1/kubernetes/{id}/metrics/applications-resources
GET
Getkubernetesmetricsforallnodes — Get a list of nodes with their live metrics
/v1/kubernetes/{id}/metrics/nodes
GET
Getkubernetesmetricsfornode — Get live metrics for a node
/v1/kubernetes/{id}/metrics/nodes/{name}
GET
Getkubernetesmetricsforallpods — Get a list of pods with their live metrics
/v1/kubernetes/{id}/metrics/pods/{namespace}
GET
Getkubernetesmetricsforpod — Get live metrics for a pod
/v1/kubernetes/{id}/metrics/pods/{namespace}/{name}
DELETE
Deletekubernetesnamespace — Delete a kubernetes namespace
/v1/kubernetes/{id}/namespaces
GET
Getkubernetesnamespaces — Get a list of namespaces
/v1/kubernetes/{id}/namespaces
POST
Createkubernetesnamespace — Create a namespace
/v1/kubernetes/{id}/namespaces
PUT
Updatekubernetesnamespacedeprecated — Update a namespace
/v1/kubernetes/{id}/namespaces
GET
Getkubernetesnamespacescount — Get the total number of kubernetes namespaces within the given Portainer environment.
/v1/kubernetes/{id}/namespaces/count
GET
Getkubernetesnamespace — Get namespace details
/v1/kubernetes/{id}/namespaces/{namespace}
PUT
Updatekubernetesnamespace — Update a namespace
/v1/kubernetes/{id}/namespaces/{namespace}
GET
Getkubernetesconfigmap — Get a ConfigMap
/v1/kubernetes/{id}/namespaces/{namespace}/configmaps/{configmap}
GET
Getkuberneteseventsfornamespace — Gets kubernetes events for namespace
/v1/kubernetes/{id}/namespaces/{namespace}/events
GET
Getkubernetesingresscontrollersbynamespace — Get a list ingress controllers by namespace
/v1/kubernetes/{id}/namespaces/{namespace}/ingresscontrollers
PUT
Updatekubernetesingresscontrollersbynamespace — Update (block/unblock) ingress controllers by namespace
/v1/kubernetes/{id}/namespaces/{namespace}/ingresscontrollers
GET
Getallkubernetesingresses — Get a list of Ingresses
/v1/kubernetes/{id}/namespaces/{namespace}/ingresses
POST
Createkubernetesingress — Create an Ingress
/v1/kubernetes/{id}/namespaces/{namespace}/ingresses
PUT
Updatekubernetesingress — Update an Ingress
/v1/kubernetes/{id}/namespaces/{namespace}/ingresses
GET
Getkubernetesingress — Get an Ingress by name
/v1/kubernetes/{id}/namespaces/{namespace}/ingresses/{ingress}
GET
Getkubernetessecret — Get a Secret
/v1/kubernetes/{id}/namespaces/{namespace}/secrets/{secret}
GET
Getkubernetesservicesbynamespace — Get a list of services for a given namespace
/v1/kubernetes/{id}/namespaces/{namespace}/services
POST
Createkubernetesservice — Create a service
/v1/kubernetes/{id}/namespaces/{namespace}/services
PUT
Updatekubernetesservice — Update a service
/v1/kubernetes/{id}/namespaces/{namespace}/services
PUT
Kubernetesnamespacestogglesystem — Toggle the system state for a namespace
/v1/kubernetes/{id}/namespaces/{namespace}/system
GET
Getkubernetesvolumesinnamespace — Get Kubernetes volumes within a namespace in the given Portainer environment
/v1/kubernetes/{id}/namespaces/{namespace}/volumes
POST
Drainnode — Drain a Kubernetes node
/v1/kubernetes/{id}/nodes/{name}/drain
GET
Getkubernetesnodeslimits — Get CPU and memory limits of all nodes within k8s cluster
/v1/kubernetes/{id}/nodes-limits
GET
Getkubernetesrbacstatus — Check if RBAC is enabled
/v1/kubernetes/{id}/rbac-enabled
POST
Deleterolebindings — Delete role bindings
/v1/kubernetes/{id}/role-bindings/delete
GET
Getkubernetesrolebindings — Get a list of kubernetes role bindings
/v1/kubernetes/{id}/rolebindings
GET
Getkubernetesroles — Get a list of kubernetes roles
/v1/kubernetes/{id}/roles
POST
Deleteroles — Delete roles
/v1/kubernetes/{id}/roles/delete
GET
Getkubernetessecrets — Get a list of Secrets
/v1/kubernetes/{id}/secrets
GET
Getkubernetessecretscount — Get Secrets count
/v1/kubernetes/{id}/secrets/count
POST
Deleteserviceaccounts — Delete service accounts
/v1/kubernetes/{id}/service-accounts/delete
GET
Getkubernetesserviceaccounts — Get a list of kubernetes service accounts
/v1/kubernetes/{id}/serviceaccounts
GET
Getkubernetesservices — Get a list of services
/v1/kubernetes/{id}/services
GET
Getallkubernetesservicescount — Get services count
/v1/kubernetes/{id}/services/count
POST
Deletekubernetesservices — Delete services
/v1/kubernetes/{id}/services/delete
GET
Getallkubernetesvolumes — Get Kubernetes volumes within the given Portainer environment
/v1/kubernetes/{id}/volumes
GET
Getallkubernetesvolumescount — Get the total number of kubernetes volumes within the given Portainer environment.
/v1/kubernetes/{id}/volumes/count
GET
Getkubernetesvolume — Get a Kubernetes volume within the given Portainer environment
/v1/kubernetes/{id}/volumes/{namespace}/{volume}

MCP Tools

generate-kubeconfig-file

Generate a kubeconfig file

read-only idempotent
get-list-applications-across-all

Get a list of applications across all namespaces in the cluster. If the nodeName is provided, it will return the applications running on that node.

read-only idempotent
get-applications-count

Get Applications count

read-only idempotent
delete-cluster-role-bindings

Delete cluster role bindings

delete-cluster-roles

Delete cluster roles

get-list-kubernetes-cluster-role

Get a list of kubernetes cluster role bindings

read-only idempotent
get-list-kubernetes-cluster-roles

Get a list of kubernetes cluster roles

read-only idempotent
get-list-configmaps

Get a list of ConfigMaps

read-only idempotent
get-configmaps-count

Get ConfigMaps count

read-only idempotent
get-list-kubernetes-cron-jobs

Get a list of kubernetes Cron Jobs

read-only idempotent
delete-cron-jobs

Delete Cron Jobs

get-dashboard-summary-data

Get the dashboard summary data

read-only idempotent
get-description-kubernetes-resource

Get a description of a kubernetes resource

read-only idempotent
gets-kubernetes-events

Gets kubernetes events

read-only idempotent
get-list-ingress-controllers

Get a list of ingress controllers

read-only idempotent
update-block-unblock-ingress-controllers

Update (block/unblock) ingress controllers

idempotent
get-kubernetes-ingresses-cluster-level

Get kubernetes ingresses at the cluster level

read-only idempotent
get-ingresses-count

Get Ingresses count

read-only idempotent
delete-one-more-ingresses

Delete one or more Ingresses

get-list-kubernetes-jobs

Get a list of kubernetes Jobs

read-only idempotent
delete-jobs

Delete Jobs

get-max-cpu-and-memory

Get max CPU and memory limits of all nodes within k8s cluster

read-only idempotent
get-total-resource-requests-and

Get the total resource requests and limits of all applications

read-only idempotent
get-list-nodes-their-live

Get a list of nodes with their live metrics

read-only idempotent
get-live-metrics-node

Get live metrics for a node

read-only idempotent
get-list-pods-their-live

Get a list of pods with their live metrics

read-only idempotent
get-live-metrics-pod

Get live metrics for a pod

read-only idempotent
delete-kubernetes-namespace

Delete a kubernetes namespace

idempotent
get-list-namespaces

Get a list of namespaces

read-only idempotent
create-namespace

Create a namespace

update-namespace

Update a namespace

idempotent
get-total-number-kubernetes-namespaces

Get the total number of kubernetes namespaces within the given Portainer environment.

read-only idempotent
get-namespace-details

Get namespace details

read-only idempotent
update-namespace-2

Update a namespace

idempotent
get-configmap

Get a ConfigMap

read-only idempotent
gets-kubernetes-events-namespace

Gets kubernetes events for namespace

read-only idempotent
get-list-ingress-controllers-namespace

Get a list ingress controllers by namespace

read-only idempotent
update-block-unblock-ingress-controllers-2

Update (block/unblock) ingress controllers by namespace

idempotent
get-list-ingresses

Get a list of Ingresses

read-only idempotent
create-ingress

Create an Ingress

update-ingress

Update an Ingress

idempotent
get-ingress-name

Get an Ingress by name

read-only idempotent
get-secret

Get a Secret

read-only idempotent
get-list-services-given-namespace

Get a list of services for a given namespace

read-only idempotent
create-service

Create a service

update-service

Update a service

idempotent
toggle-system-state-namespace

Toggle the system state for a namespace

idempotent
get-kubernetes-volumes-within-namespace

Get Kubernetes volumes within a namespace in the given Portainer environment

read-only idempotent
drain-kubernetes-node

Drain a Kubernetes node

get-cpu-and-memory-limits

Get CPU and memory limits of all nodes within k8s cluster

read-only idempotent
check-if-rbac-is-enabled

Check if RBAC is enabled

read-only idempotent
delete-role-bindings

Delete role bindings

get-list-kubernetes-role-bindings

Get a list of kubernetes role bindings

read-only idempotent
get-list-kubernetes-roles

Get a list of kubernetes roles

read-only idempotent
delete-roles

Delete roles

get-list-secrets

Get a list of Secrets

read-only idempotent
get-secrets-count

Get Secrets count

read-only idempotent
delete-service-accounts

Delete service accounts

get-list-kubernetes-service-accounts

Get a list of kubernetes service accounts

read-only idempotent
get-list-services

Get a list of services

read-only idempotent
get-services-count

Get services count

read-only idempotent
delete-services

Delete services

get-kubernetes-volumes-within-given

Get Kubernetes volumes within the given Portainer environment

read-only idempotent
get-total-number-kubernetes-volumes

Get the total number of kubernetes volumes within the given Portainer environment.

read-only idempotent
get-kubernetes-volume-within-given

Get a Kubernetes volume within the given Portainer environment

read-only idempotent

Capability Spec

portainer-kubernetes.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: PortainerCE API — kubernetes
  description: 'PortainerCE API — kubernetes. 65 operations. Lead operation: Generate a kubeconfig file. Self-contained Naftiko
    capability covering one Portainer business surface.'
  tags:
  - Portainer
  - kubernetes
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    PORTAINER_API_KEY: PORTAINER_API_KEY
capability:
  consumes:
  - type: http
    namespace: portainer-kubernetes
    baseUri: ''
    description: PortainerCE API — kubernetes business capability. Self-contained, no shared references.
    resources:
    - name: kubernetes-config
      path: /kubernetes/config
      operations:
      - name: getkubernetesconfig
        method: GET
        description: Generate a kubeconfig file
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: ids
          in: query
          type: array
          description: will include only these environments(endpoints)
        - name: excludeIds
          in: query
          type: array
          description: will exclude these environments(endpoints)
    - name: kubernetes-id-applications
      path: /kubernetes/{id}/applications
      operations:
      - name: getallkubernetesapplications
        method: GET
        description: Get a list of applications across all namespaces in the cluster. If the nodeName is provided, it will
          return the applications running on that node.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment(Endpoint) identifier
          required: true
        - name: namespace
          in: query
          type: string
          description: Namespace name
          required: true
        - name: nodeName
          in: query
          type: string
          description: Node name
          required: true
    - name: kubernetes-id-applications-count
      path: /kubernetes/{id}/applications/count
      operations:
      - name: getallkubernetesapplicationscount
        method: GET
        description: Get Applications count
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
    - name: kubernetes-id-cluster_role_bindings-delete
      path: /kubernetes/{id}/cluster_role_bindings/delete
      operations:
      - name: deleteclusterrolebindings
        method: POST
        description: Delete cluster role bindings
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: payload
          in: body
          type: array
          description: A list of cluster role bindings to delete
          required: true
    - name: kubernetes-id-cluster_roles-delete
      path: /kubernetes/{id}/cluster_roles/delete
      operations:
      - name: deleteclusterroles
        method: POST
        description: Delete cluster roles
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: payload
          in: body
          type: array
          description: A list of cluster roles to delete
          required: true
    - name: kubernetes-id-clusterrolebindings
      path: /kubernetes/{id}/clusterrolebindings
      operations:
      - name: getallkubernetesclusterrolebindings
        method: GET
        description: Get a list of kubernetes cluster role bindings
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
    - name: kubernetes-id-clusterroles
      path: /kubernetes/{id}/clusterroles
      operations:
      - name: getallkubernetesclusterroles
        method: GET
        description: Get a list of kubernetes cluster roles
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
    - name: kubernetes-id-configmaps
      path: /kubernetes/{id}/configmaps
      operations:
      - name: getallkubernetesconfigmaps
        method: GET
        description: Get a list of ConfigMaps
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: isUsed
          in: query
          type: boolean
          description: Set to true to include information about applications that use the ConfigMaps in the response
          required: true
    - name: kubernetes-id-configmaps-count
      path: /kubernetes/{id}/configmaps/count
      operations:
      - name: getallkubernetesconfigmapscount
        method: GET
        description: Get ConfigMaps count
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
    - name: kubernetes-id-cron_jobs
      path: /kubernetes/{id}/cron_jobs
      operations:
      - name: getkubernetescronjobs
        method: GET
        description: Get a list of kubernetes Cron Jobs
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
    - name: kubernetes-id-cron_jobs-delete
      path: /kubernetes/{id}/cron_jobs/delete
      operations:
      - name: deletecronjobs
        method: POST
        description: Delete Cron Jobs
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: payload
          in: body
          type: string
          description: A map where the key is the namespace and the value is an array of Cron Jobs to delete
          required: true
    - name: kubernetes-id-dashboard
      path: /kubernetes/{id}/dashboard
      operations:
      - name: getkubernetesdashboard
        method: GET
        description: Get the dashboard summary data
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment (Endpoint) identifier
          required: true
    - name: kubernetes-id-describe
      path: /kubernetes/{id}/describe
      operations:
      - name: describeresource
        method: GET
        description: Get a description of a kubernetes resource
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: name
          in: query
          type: string
          description: Resource name
          required: true
        - name: kind
          in: query
          type: string
          description: Resource kind
          required: true
        - name: namespace
          in: query
          type: string
          description: Namespace
    - name: kubernetes-id-events
      path: /kubernetes/{id}/events
      operations:
      - name: getallkubernetesevents
        method: GET
        description: Gets kubernetes events
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: resourceId
          in: query
          type: string
          description: The resource id of the involved kubernetes object
    - name: kubernetes-id-ingresscontrollers
      path: /kubernetes/{id}/ingresscontrollers
      operations:
      - name: getallkubernetesingresscontrollers
        method: GET
        description: Get a list of ingress controllers
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: allowedOnly
          in: query
          type: boolean
          description: Only return allowed ingress controllers
      - name: updatekubernetesingresscontrollers
        method: PUT
        description: Update (block/unblock) ingress controllers
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: body
          in: body
          type: array
          description: Ingress controllers
          required: true
    - name: kubernetes-id-ingresses
      path: /kubernetes/{id}/ingresses
      operations:
      - name: getallkubernetesclusteringresses
        method: GET
        description: Get kubernetes ingresses at the cluster level
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: withServices
          in: query
          type: boolean
          description: Lookup services associated with each ingress
    - name: kubernetes-id-ingresses-count
      path: /kubernetes/{id}/ingresses/count
      operations:
      - name: getallkubernetesclusteringressescount
        method: GET
        description: Get Ingresses count
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
    - name: kubernetes-id-ingresses-delete
      path: /kubernetes/{id}/ingresses/delete
      operations:
      - name: deletekubernetesingresses
        method: POST
        description: Delete one or more Ingresses
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: body
          in: body
          type: string
          description: Ingress details
          required: true
    - name: kubernetes-id-jobs
      path: /kubernetes/{id}/jobs
      operations:
      - name: getkubernetesjobs
        method: GET
        description: Get a list of kubernetes Jobs
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: includeCronJobChildren
          in: query
          type: boolean
          description: Whether to include Jobs that have a cronjob owner
    - name: kubernetes-id-jobs-delete
      path: /kubernetes/{id}/jobs/delete
      operations:
      - name: deletejobs
        method: POST
        description: Delete Jobs
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: payload
          in: body
          type: string
          description: A map where the key is the namespace and the value is an array of Jobs to delete
          required: true
    - name: kubernetes-id-max_resource_limits
      path: /kubernetes/{id}/max_resource_limits
      operations:
      - name: getkubernetesmaxresourcelimits
        method: GET
        description: Get max CPU and memory limits of all nodes within k8s cluster
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment(Endpoint) identifier
          required: true
    - name: kubernetes-id-metrics-applications_resources
      path: /kubernetes/{id}/metrics/applications_resources
      operations:
      - name: getapplicationsresources
        method: GET
        description: Get the total resource requests and limits of all applications
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment(Endpoint) identifier
          required: true
        - name: node
          in: query
          type: string
          description: Node name
          required: true
    - name: kubernetes-id-metrics-nodes
      path: /kubernetes/{id}/metrics/nodes
      operations:
      - name: getkubernetesmetricsforallnodes
        method: GET
        description: Get a list of nodes with their live metrics
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
    - name: kubernetes-id-metrics-nodes-name
      path: /kubernetes/{id}/metrics/nodes/{name}
      operations:
      - name: getkubernetesmetricsfornode
        method: GET
        description: Get live metrics for a node
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: name
          in: path
          type: string
          description: Node identifier
          required: true
    - name: kubernetes-id-metrics-pods-namespace
      path: /kubernetes/{id}/metrics/pods/{namespace}
      operations:
      - name: getkubernetesmetricsforallpods
        method: GET
        description: Get a list of pods with their live metrics
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: namespace
          in: path
          type: string
          description: Namespace
          required: true
    - name: kubernetes-id-metrics-pods-namespace-name
      path: /kubernetes/{id}/metrics/pods/{namespace}/{name}
      operations:
      - name: getkubernetesmetricsforpod
        method: GET
        description: Get live metrics for a pod
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: namespace
          in: path
          type: string
          description: Namespace
          required: true
        - name: name
          in: path
          type: string
          description: Pod identifier
          required: true
    - name: kubernetes-id-namespaces
      path: /kubernetes/{id}/namespaces
      operations:
      - name: deletekubernetesnamespace
        method: DELETE
        description: Delete a kubernetes namespace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
      - name: getkubernetesnamespaces
        method: GET
        description: Get a list of namespaces
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: withResourceQuota
          in: query
          type: boolean
          description: When set to true, include the resource quota information as part of the Namespace information. Default
            is false
          required: true
        - name: withUnhealthyEvents
          in: query
          type: boolean
          description: When set to true, include the unhealthy events information as part of the Namespace information. Default
            is false
          required: true
      - name: createkubernetesnamespace
        method: POST
        description: Create a namespace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: body
          in: body
          type: string
          description: Namespace configuration details
          required: true
      - name: updatekubernetesnamespacedeprecated
        method: PUT
        description: Update a namespace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: namespace
          in: path
          type: string
          description: Namespace
          required: true
        - name: body
          in: body
          type: string
          description: Namespace details
          required: true
    - name: kubernetes-id-namespaces-count
      path: /kubernetes/{id}/namespaces/count
      operations:
      - name: getkubernetesnamespacescount
        method: GET
        description: Get the total number of kubernetes namespaces within the given Portainer environment.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
    - name: kubernetes-id-namespaces-namespace
      path: /kubernetes/{id}/namespaces/{namespace}
      operations:
      - name: getkubernetesnamespace
        method: GET
        description: Get namespace details
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: namespace
          in: path
          type: string
          description: The namespace name to get details for
          required: true
        - name: withResourceQuota
          in: query
          type: boolean
          description: When set to true, include the resource quota information as part of the Namespace information. Default
            is false
          required: true
      - name: updatekubernetesnamespace
        method: PUT
        description: Update a namespace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: namespace
          in: path
          type: string
          description: Namespace
          required: true
        - name: body
          in: body
          type: string
          description: Namespace details
          required: true
    - name: kubernetes-id-namespaces-namespace-configmaps-configmap
      path: /kubernetes/{id}/namespaces/{namespace}/configmaps/{configmap}
      operations:
      - name: getkubernetesconfigmap
        method: GET
        description: Get a ConfigMap
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: namespace
          in: path
          type: string
          description: The namespace name where the configmap is located
          required: true
        - name: configmap
          in: path
          type: string
          description: The configmap name to get details for
          required: true
    - name: kubernetes-id-namespaces-namespace-events
      path: /kubernetes/{id}/namespaces/{namespace}/events
      operations:
      - name: getkuberneteseventsfornamespace
        method: GET
        description: Gets kubernetes events for namespace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: namespace
          in: path
          type: string
          description: The namespace name the events are associated to
          required: true
        - name: resourceId
          in: query
          type: string
          description: The resource id of the involved kubernetes object
    - name: kubernetes-id-namespaces-namespace-ingresscontrollers
      path: /kubernetes/{id}/namespaces/{namespace}/ingresscontrollers
      operations:
      - name: getkubernetesingresscontrollersbynamespace
        method: GET
        description: Get a list ingress controllers by namespace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: namespace
          in: path
          type: string
          description: Namespace
          required: true
      - name: updatekubernetesingresscontrollersbynamespace
        method: PUT
        description: Update (block/unblock) ingress controllers by namespace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: namespace
          in: path
          type: string
          description: Namespace name
          required: true
        - name: body
          in: body
          type: array
          description: Ingress controllers
          required: true
    - name: kubernetes-id-namespaces-namespace-ingresses
      path: /kubernetes/{id}/namespaces/{namespace}/ingresses
      operations:
      - name: getallkubernetesingresses
        method: GET
        description: Get a list of Ingresses
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: namespace
          in: path
          type: string
          description: Namespace name
          required: true
      - name: createkubernetesingress
        method: POST
        description: Create an Ingress
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: namespace
          in: path
          type: string
          description: Namespace name
          required: true
        - name: body
          in: body
          type: string
          description: Ingress details
          required: true
      - name: updatekubernetesingress
        method: PUT
        description: Update an Ingress
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: namespace
          in: path
          type: string
          description: Namespace name
          required: true
        - name: body
          in: body
          type: string
          description: Ingress details
          required: true
    - name: kubernetes-id-namespaces-namespace-ingresses-ingress
      path: /kubernetes/{id}/namespaces/{namespace}/ingresses/{ingress}
      operations:
      - name: getkubernetesingress
        method: GET
        description: Get an Ingress by name
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: namespace
          in: path
          type: string
          description: Namespace name
          required: true
        - name: ingress
          in: path
          type: string
          description: Ingress name
          required: true
    - name: kubernetes-id-namespaces-namespace-secrets-secret
      path: /kubernetes/{id}/namespaces/{namespace}/secrets/{secret}
      operations:
      - name: getkubernetessecret
        method: GET
        description: Get a Secret
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: namespace
          in: path
          type: string
          description: The namespace name where the secret is located
          required: true
        - name: secret
          in: path
          type: string
          description: The secret name to get details for
          required: true
    - name: kubernetes-id-namespaces-namespace-services
      path: /kubernetes/{id}/namespaces/{namespace}/services
      operations:
      - name: getkubernetesservicesbynamespace
        method: GET
        description: Get a list of services for a given namespace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: namespace
          in: path
          type: string
          description: Namespace name
          required: true
      - name: createkubernetesservice
        method: POST
        description: Create a service
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: namespace
          in: path
          type: string
          description: Namespace name
          required: true
        - name: body
          in: body
          type: string
          description: Service definition
          required: true
      - name: updatekubernetesservice
        method: PUT
        description: Update a service
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: namespace
          in: path
          type: string
          description: Namespace name
          required: true
        - name: body
          in: body
          type: string
          description: Service definition
          required: true
    - name: kubernetes-id-namespaces-namespace-system
      path: /kubernetes/{id}/namespaces/{namespace}/system
      operations:
      - name: kubernetesnamespacestogglesystem
        method: PUT
        description: Toggle the system state for a namespace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: namespace
          in: path
          type: string
          description: Namespace name
          required: true
        - name: body
          in: body
          type: string
          description: Update details
          required: true
    - name: kubernetes-id-namespaces-namespace-volumes
      path: /kubernetes/{id}/namespaces/{namespace}/volumes
      operations:
      - name: getkubernetesvolumesinnamespace
        method: GET
        description: Get Kubernetes volumes within a namespace in the given Portainer environment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment identifier
          required: true
        - name: namespace
          in: path
          type: string
          description: Namespace identifier
          required: true
        - name: withApplications
          in: query
          type: boolean
          description: When set to True, include the applications that are using the volumes. It is set to false by default
    - name: kubernetes-id-nodes-name-drain
      path: /kubernetes/{id}/nodes/{name}/drain
      operations:
      - name: drainnode
        method: POST
        description: Drain a Kubernetes node
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Environment(Endpoint) identifier
          required: true
        - name: name
        

# --- truncated at 32 KB (95 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/portainer/refs/heads/main/capabilities/portainer-kubernetes.yaml