IBM Cloud Kubernetes Set Worker Pool Labels API

The SetWorkerPoolLabels API from IBM Cloud Kubernetes — 1 operation(s) for setworkerpoollabels.

GitHub OpenAPI

Operations 1

POST /v2/setWorkerPoolLabels Set custom labels for a worker pool #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ibm-cloud-kubernetes:ibm-cloud-kubernetes-setworkerpoollabels-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ibm-cloud-kubernetes-setworkerpoollabels-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ibm Cloud Kubernetes Set Worker Pool Labels API
  version: '1.1'
  description: 'Operations tagged SetWorkerPoolLabels across 2 of this provider''s published API definitions: ibm-cloud-kubernetes-swagger.json, ibm-cloud-kubernetes-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: /global
- url: https://containers.cloud.ibm.com/global
tags:
- name: SetWorkerPoolLabels
paths:
  /v2/setWorkerPoolLabels:
    post:
      description: Set custom labels for a worker pool and each of its worker nodes. You might use labels to restrict a workload to run on only this worker pool, or to apply a taint so that workloads do not run on the worker pool. To confirm that your custom labels are applied, run `ibmcloud ks worker-pool get -c `. To check the labels of the worker nodes, get the private IP address of the worker node (`ibmcloud ks worker ls -c `) and run `kubectl describe node `. Note that you must not edit the system-provided labels that that come with the worker pool and worker nodes by default, or you might experience unexpected results.
      tags:
      - SetWorkerPoolLabels
      summary: Set custom labels for a worker pool
      operationId: v2SetWorkerPoolLabels
      parameters:
      - description: Your IBM Cloud Identity and Access Management (IAM) token. To retrieve your IAM token, run `ibmcloud iam oauth-tokens`.
        name: Authorization
        in: header
        required: true
        schema:
          type: string
      - description: The ID of the resource group that the cluster is in. To check the resource group ID of the cluster, use the `GET /v2/getCluster` API.
        name: X-Auth-Resource-Group
        in: header
        schema:
          type: string
      responses:
        '204':
          description: OK. The request to set the labels of the worker pool was successfully received.
          headers:
            X-Request-Id:
              description: Unique ID for this request
              schema:
                type: string
        '400':
          description: Bad request. The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all required parameters in your request in JSON format.
          headers:
            X-Request-Id:
              description: Unique ID for this request
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized. The IAM token is invalid or expired. To retrieve your IAM token, run `ibmcloud login` and then `ibmcloud iam oauth-tokens`.
          headers:
            X-Request-Id:
              description: Unique ID for this request
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error. IBM Cloud Kubernetes Service is currently unavailable. Your request could not be processed. Please wait a few minutes and try again. If you still encounter this problem, note the incident ID and contact IBM Cloud support.
          headers:
            X-Request-Id:
              description: Unique ID for this request
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-ibm-events:
        description: Kubernetes labels for a worker pool are set. Existing and future worker nodes in the worker pool inherit the label.
        events:
        - name: containers-kubernetes.cluster-worker-pool-label.set
      x-ibm-permissions:
        actions:
        - name: containers-kubernetes.cluster.operate
        description: To get the action, the user must have the Operator platform role to Kubernetes Service in IAM.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetWorkerPoolLabels'
        description: Labels to apply to the worker pool and each of its worker nodes. To apply a custom label to the worker pool, set the "state" field to "labels" and fill in the "labels" section with your label key-value pairs. When you apply a label, all existing custom labels are replaced. If you have existing custom labels that you want to keep, include them in your request. To remove a custom label, set the "state" field to "labels" and in the "labels" section, include the same "key" field, but leave the value field blank "". Note that you must not edit the system-provided labels that that come with the worker pool and worker nodes by default, or you might experience unexpected results.
        required: true
    servers:
    - url: /global
components:
  schemas:
    ErrorResponse:
      description: ErrorResponse error response to end users
      type: object
      properties:
        code:
          type: string
          x-go-name: ID
        description:
          type: string
          x-go-name: Err
        incidentID:
          type: string
          x-go-name: ReqID
        recoveryCLI:
          type: string
          x-go-name: RecoveryCLI
        terseDescription:
          type: string
          x-go-name: TerseErr
        type:
          $ref: '#/components/schemas/ErrorType'
      x-go-package: github.ibm.com/alchemy-containers/armada-model/errors
    ErrorType:
      description: ErrorType error type
      type: string
      x-go-package: github.ibm.com/alchemy-containers/armada-model/errors
    SetWorkerPoolLabels:
      type: object
      title: SetWorkerPoolLabels provides label key and value pairs to set on a worker pool.
      properties:
        cluster:
          type: string
          x-go-name: Cluster
        labels:
          type: object
          additionalProperties:
            type: string
          x-go-name: Labels
        workerpool:
          type: string
          x-go-name: WorkerPool
      x-go-package: github.ibm.com/alchemy-containers/armada-api-model/json/v2/requests
x-refined-from:
- ibm-cloud-kubernetes-swagger.json
- ibm-cloud-kubernetes-openapi.yml