Home Explore Blog CI



kubernetes

content/en/docs/tasks/administer-cluster/enable-disable-api.md
2bdee3f1eb57b4697abeaaf55017592e7c0f6365c01a5dd00000000300000438
---
title: Enable Or Disable A Kubernetes API
content_type: task
weight: 200
---

<!-- overview -->
This page shows how to enable or disable an API version from your cluster's
{{< glossary_tooltip text="control plane" term_id="control-plane" >}}.

<!-- steps -->


Specific API versions can be turned on or off by passing `--runtime-config=api/<version>` as a
command line argument to the API server. The values for this argument are a comma-separated
list of API versions. Later values override earlier values.

The `runtime-config` command line argument also supports 2 special keys:

- `api/all`, representing all known APIs
- `api/legacy`, representing only legacy APIs. Legacy APIs are any APIs that have been
   explicitly [deprecated](/docs/reference/using-api/deprecation-policy/).

For example, to turn off all API versions except v1, pass `--runtime-config=api/all=false,api/v1=true`
to the `kube-apiserver`.

## {{% heading "whatsnext" %}}

Read the [full documentation](/docs/reference/command-line-tools-reference/kube-apiserver/)
for the `kube-apiserver` component.

Chunks
fb97e7bc (1st chunk of `content/en/docs/tasks/administer-cluster/enable-disable-api.md`)
Title: Enabling or Disabling Kubernetes APIs
Summary
This document explains how to enable or disable specific API versions in a Kubernetes cluster's control plane. You can control API versions using the `--runtime-config` flag of the `kube-apiserver`, which accepts a comma-separated list of API versions. The values are processed in order, with later values overriding earlier ones. Special keys `api/all` and `api/legacy` can be used to control all or only legacy APIs, respectively. For instance, use `--runtime-config=api/all=false,api/v1=true` to only enable the v1 API version.