---
title: "POST /gateway-update-k8s-auth-config"
method: POST
path: "/gateway-update-k8s-auth-config"
tags: ["v2"]
---

# POST /gateway-update-k8s-auth-config

`POST /gateway-update-k8s-auth-config`

## Request body

- GatewayUpdateK8SAuthConfig — gatewayUpdateK8SAuth is a command that updates k8s auth config
  - `access-id` string, required — The access ID of the Kubernetes auth method
  - `cluster-api-type` string — Cluster access type. options: [native_k8s, rancher]
  - `disable-issuer-validation` string — Disable issuer validation [true/false]
  - `json` boolean — Set output format to JSON
  - `k8s-auth-type` string — K8S auth type [token/certificate]. (relevant for "native_k8s" only)
  - `k8s-ca-cert` string — The CA Certificate (base64 encoded) to use to call into the kubernetes API server
  - `k8s-client-certificate` string — Content of the k8 client certificate (PEM format) in a Base64 format (relevant for "native_k8s" only)
  - `k8s-client-key` string — Content of the k8 client private key (PEM format) in a Base64 format (relevant for "native_k8s" only)
  - `k8s-host` string, required — The URL of the kubernetes API server
  - `k8s-issuer` string — The Kubernetes JWT issuer name. K8SIssuer is the claim that specifies who issued the Kubernetes token
  - `name` string, required — K8S Auth config name
  - `new-name` string, required — K8S Auth config new name
  - `rancher-api-key` string — The api key used to access the TokenReview API to validate other JWTs (relevant for "rancher" only)
  - `rancher-cluster-id` string — The cluster id as define in rancher (relevant for "rancher" only)
  - `signing-key` string, required — The private key (base64 encoded) associated with the public key defined in the Kubernetes auth
  - `token` string — Authentication token (see `/auth` and `/configure`)
  - `token-exp` integer — Time in seconds of expiration of the Akeyless Kube Auth Method token
  - `token-reviewer-jwt` string — A Kubernetes service account JWT used to access the TokenReview API to validate other JWTs (relevant for "native_k8s" only). If not set, the JWT submitted in the authentication process will be used to access the Kubernetes TokenReview API.
  - `uid-token` string — The universal identity token, Required only for universal_identity authentication
  - `use-gw-service-account` boolean — Use the GW's service account

## Response `201`

gatewayUpdateK8SAuthConfigResponse wraps response body.

- GatewayUpdateK8SAuthConfigOutput
  - `cluster_id` string
  - `parts_change` ConfigChange
    - `config_hash` ConfigHash
      - `admins` string
      - `ai_insights` string
      - `cache` string
      - `customer_fragements` string
      - `general` string
      - `k8s_auths` string
      - `kmip` string
      - `ldap` string
      - `leadership` string
      - `log_forwarding` string
      - `m_queue` string
      - `migration_status` string
      - `migrations` string
      - `producers` unknown
      - `producers_status` string
      - `rotators` unknown
      - `saml` string
      - `universal_identity` string
    - `last_change` LastConfigChange
      - `last_k8s_auths_change` K8SAuthsConfigLastChange
        - `changed_k8s_auths_ids` string[]
        - `created_k8s_auths_ids` string[]
        - `deleted_k8s_auths_ids` string[]
      - `last_migrations_change` MigrationsConfigLastChange
        - `changed_migrations` string[]
        - `created_migrations` string[]
        - `deleted_migrations` string[]
    - `last_status` LastStatusInfo
      - `migrations_status` MigrationStatus
        - `last_messages` object
        - `last_reports` object
        - `last_statuses` object
      - `producers_errors` unknown
      - `was_migrations_copied_to_new_table` boolean — flag to indicate migrationStatus copied to new table
    - `required_activity` RequiredActivity
      - `migrations_required_activity` object
    - `update_stamp` integer
  - `total_hash` string

## Other responses

- `default` — errorResponse wraps any error to return it as a JSON object with one "error" field.

---

[API](https://skmtc.net/akeyless/apis/akeyless-api.md) · [All operations](https://skmtc.net/akeyless/apis/akeyless-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/akeyless/akeyless-api/versions/0ceb25634501/schema)
