IBM Cloud Kubernetes Pod Security API

The pod-security API from IBM Cloud Kubernetes — 6 operation(s) for pod-security.

GitHub OpenAPI

Operations 6

POST /v2/disablePodSecurityPolicy Deprecated: Disable the Pod Security Policy admission controller #
POST /v2/enablePodSecurityPolicy Deprecated: Enable the Pod Security Policy admission controller #
GET /v2/getPodSecurity View the Pod Security admission control configuration for a cluster #
GET /v2/getPodSecurityPolicy Deprecated: View the Pod Security Policy admission control configuration #
POST /v2/removePodSecurity Deprecated: Remove the Pod Security admission controller configuration for… #
POST /v2/setPodSecurity Set the Pod Security admission controller configuration #

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-pod-security-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-pod-security-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ibm Cloud Kubernetes Pod Security API
  version: '1.1'
  description: 'Operations tagged pod-security 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: pod-security
paths:
  /v2/disablePodSecurityPolicy:
    post:
      description: 'Deprecated: This API was only available for Kubernetes clusters that ran version 1.24. Disable the Pod Security Policy admission controller for Kubernetes. Use this API when migrating from the deprecated Pod Security Policy to the Pod Security admission controller.'
      tags:
      - pod-security
      summary: 'Deprecated: Disable the Pod Security Policy admission controller'
      operationId: V2DisablePodSecurityPolicy
      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
      responses:
        '204':
          description: OK. The request to disable the Pod Security Policy admission controller 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. \

            Bad Request. Your cluster must run Kubernetes version 1.24 to change the Pod Security Policy admission controller. \

            Bad Request. Cannot disable the Pod Security Policy admission controller when the Pod Security admission controller is disabled.

            '
          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'
      x-ibm-events:
        description: The Pod Security Policy admission controller is disabled.
        events:
        - name: containers-kubernetes.cluster-pod-security.disable
      x-ibm-permissions:
        actions:
        - name: containers-kubernetes.cluster.update
        description: To change the Pod Security Policy admission controller configuration, you must have the Administrator platform role for the Kubernetes Service in IAM.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DisablePodSecurityPolicyRequest'
        description: The cluster to target.
        required: true
    servers:
    - url: /global
  /v2/enablePodSecurityPolicy:
    post:
      description: 'Deprecated: This API was only available for Kubernetes clusters that ran version 1.24. Enable the Pod Security Policy admission controller. Use this API when migrating from the deprecated Pod Security Policy to the Pod Security admission controller.'
      tags:
      - pod-security
      summary: 'Deprecated: Enable the Pod Security Policy admission controller'
      operationId: V2EnablePodSecurityPolicy
      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
      responses:
        '204':
          description: OK. The request to enable the Pod Security Policy admission controller 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. \

            Bad Request. Your cluster must run Kubernetes version 1.24 to change the Pod Security Policy admission controller.

            '
          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'
      x-ibm-events:
        description: The Pod Security Policy admission controller configuration is updated.
        events:
        - name: containers-kubernetes.cluster-pod-security-policy.enable
      x-ibm-permissions:
        actions:
        - name: containers-kubernetes.cluster.update
        description: To change the Pod Security Policy admission controller configuration, you must have the Administrator platform role for the Kubernetes Service in IAM.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnablePodSecurityPolicyRequest'
        description: The cluster to target.
        required: true
    servers:
    - url: /global
  /v2/getPodSecurity:
    get:
      description: View the Pod Security admission control configuration for a cluster.
      tags:
      - pod-security
      summary: View the Pod Security admission control configuration for a cluster
      operationId: V2GetPodSecurity
      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 name or ID of the cluster that you want to get the Pod Security admission control configuration for. To list the clusters that you have access to, use the `GET /v2/clusters` API or run `ibmcloud ks cluster ls`.
        name: cluster
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Ok. The request to view the Pod Security admission control configuration was successfully processed.
          headers:
            X-Request-Id:
              description: Unique ID for this request
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PodSecurityResponse'
        '400':
          description: 'Bad Request. Required parameters were not set. You must provide the `cluster` query parameter. \

            Bad Request. Pod Security admission is supported only for Kubernetes v1.24 or later clusters. \

            Bad Request. Pod Security admission is not supported for Red Hat OpenShift clusters.

            '
          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'
      x-ibm-events:
        description: View the Pod Security admission control configuration for a cluster.
        events:
        - name: containers-kubernetes.cluster-pod-security.get
    servers:
    - url: /global
  /v2/getPodSecurityPolicy:
    get:
      description: 'Deprecated: This API was only available for Kubernetes clusters that ran version 1.24. View the Pod Security Policy admission control configuration. Use this API when migrating from the deprecated Pod Security Policy to the Pod Security admission controller.'
      tags:
      - pod-security
      summary: 'Deprecated: View the Pod Security Policy admission control configuration'
      operationId: V2GetPodSecurityPolicy
      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 name or ID of the cluster that you want to get the Pod Security admission control configuration for. To list the clusters that you have access to, use the `GET /v2/clusters` API or run `ibmcloud ks cluster ls`.
        name: cluster
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Ok. The request to view Pod Security Policy admission control configuration was successfully processed.
          headers:
            X-Request-Id:
              description: Unique ID for this request
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PodSecurityPolicyResponse'
        '400':
          description: 'Bad Request. Required parameters were not set. You must provide the `cluster` query parameter. \

            Bad Request. Pod Security admission configuration is not supported for OpenShift clusters. \

            Bad Request. Your cluster must run Kubernetes version 1.24 to remove the Pod Security admission controller or to change the Pod Security Policy admission controller.

            '
          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'
      x-ibm-events:
        description: View the Pod Security Policy admission control configuration for a cluster that runs Kubernetes version 1.24.
        events:
        - name: containers-kubernetes.cluster-pod-security-policy.get
    servers:
    - url: /global
  /v2/removePodSecurity:
    post:
      description: 'Deprecated: This API was only available for Kubernetes clusters that ran version 1.24. Remove the Pod Security admission controller configuration. Use this API when migrating from the deprecated Pod Security Policy to the Pod Security admission controller.'
      tags:
      - pod-security
      summary: 'Deprecated: Remove the Pod Security admission controller configuration for…'
      operationId: V2RemovePodSecurity
      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
      responses:
        '204':
          description: OK. The request to remove the Pod Security admission controller configuration 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. \

            Bad Request. Your cluster must run Kubernetes version 1.24 to remove the Pod Security admission controller or to change the Pod Security Policy admission controller. \

            Bad Request. Cannot disable the Pod Security admission controller when the Pod Security Policy admission controller is disabled.

            '
          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'
      x-ibm-events:
        description: The Pod Security admission controller configuration is removed.
        events:
        - name: containers-kubernetes.cluster-pod-security.remove
      x-ibm-permissions:
        actions:
        - name: containers-kubernetes.cluster.update
        description: To change the Pod Security admission controller configuration, you must have the Administrator platform role for the Kubernetes Service in IAM.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RemovePodSecurityRequest'
        description: The cluster to target.
        required: true
    servers:
    - url: /global
  /v2/setPodSecurity:
    post:
      description: Set the Pod Security admission controller configuration.
      tags:
      - pod-security
      summary: Set the Pod Security admission controller configuration
      operationId: V2SetPodSecurity
      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
      responses:
        '204':
          description: OK. The request to set the Pod Security admission controller configuration 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. \

            Bad Request. Your cluster must run Kubernetes version 1.24 or later to modify the Pod Security admission configuration. \

            Bad Request. Pod Security admission is not supported for Red Hat OpenShift clusters.

            '
          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'
      x-ibm-events:
        description: The Pod Security admission controller configuration is updated.
        events:
        - name: containers-kubernetes.cluster-pod-security.set
      x-ibm-permissions:
        actions:
        - name: containers-kubernetes.cluster.update
        description: To change the Pod Security admission controller configuration, you must have the Administrator platform role for the Kubernetes Service in IAM.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetPodSecurityRequest'
        description: The cluster to target.
        required: true
    servers:
    - url: /global
components:
  schemas:
    PodSecurityPolicyResponse:
      description: PodSecurityPolicyResponse represents the state of the cluster PodSecurityPolicy admission controller
      type: object
      properties:
        enabled:
          type: boolean
          x-go-name: Enabled
      x-go-package: github.ibm.com/alchemy-containers/armada-api-model/json/v2/responses
    EnablePodSecurityPolicyRequest:
      description: EnablePodSecurityPolicyRequest enables the cluster PodSecurityPolicy admission controller for v1.24 clusters
      type: object
      properties:
        cluster:
          type: string
          x-go-name: Cluster
      x-go-package: github.ibm.com/alchemy-containers/armada-api-model/json/v2/requests
    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
    RemovePodSecurityRequest:
      description: RemovePodSecurityRequest disables the cluster PodSecurity admission controller for v1.24 clusters
      type: object
      properties:
        cluster:
          type: string
          x-go-name: Cluster
      x-go-package: github.ibm.com/alchemy-containers/armada-api-model/json/v2/requests
    DisablePodSecurityPolicyRequest:
      description: DisablePodSecurityPolicyRequest disables the cluster PodSecurityPolicy admission controller for v1.24 clusters
      type: object
      properties:
        cluster:
          type: string
          x-go-name: Cluster
      x-go-package: github.ibm.com/alchemy-containers/armada-api-model/json/v2/requests
    PodSecurityResponse:
      description: PodSecurityResponse represents the configuration of the cluster PodSecurity admission controller
      type: object
      properties:
        configuration:
          description: Configuration is a base64 encoded PodSecurityConfiguration yaml definition
          type: string
          format: byte
          x-go-name: Configuration
        enabled:
          type: boolean
          x-go-name: Enabled
      x-go-package: github.ibm.com/alchemy-containers/armada-api-model/json/v2/responses
    ErrorType:
      description: ErrorType error type
      type: string
      x-go-package: github.ibm.com/alchemy-containers/armada-model/errors
    SetPodSecurityRequest:
      description: SetPodSecurityRequest configures the cluster PodSecurity admission controller
      type: object
      properties:
        cluster:
          type: string
          x-go-name: Cluster
        configuration:
          description: 'Optional: A base64 encoded Kubernetes PodSecurityConfiguration yaml definition.

            If configuration is present the specified custom configuration will be used.

            If configuration is not present the default Kubernetes configuration will be used.'
          type: string
          format: byte
          x-go-name: Configuration
      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