Skip to content

Commit aa13f1a

Browse files
authored
Merge pull request #761 from bbiggerr/lke-regenerate
Add Kubernetes Cluster Regenerate and Service Token Delete commands
2 parents e458fda + f8cdd35 commit aa13f1a

File tree

1 file changed

+110
-0
lines changed

1 file changed

+110
-0
lines changed

openapi.yaml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11071,6 +11071,116 @@ paths:
1107111071
- lang: CLI
1107211072
source: >
1107311073
linode-cli lke kubeconfig-delete 12345
11074+
/lke/clusters/{clusterId}/regenerate:
11075+
parameters:
11076+
- name: clusterId
11077+
in: path
11078+
description: ID of the target Kubernetes cluster.
11079+
required: true
11080+
schema:
11081+
type: integer
11082+
x-linode-cli-command: lke
11083+
post:
11084+
operationId: postLKEClusterRegenerate
11085+
x-linode-cli-action: regenerate
11086+
security:
11087+
- personalAccessToken: []
11088+
- oauth:
11089+
- lke:read_write
11090+
tags:
11091+
- Linode Kubernetes Engine (LKE)
11092+
summary: Kubernetes Cluster Regenerate
11093+
description: |
11094+
Regenerate the Kubeconfig file and/or the service account token for a Cluster.
11095+
11096+
This is a helper command that allows performing both the [Kubeconfig Delete](#kubeconfig-delete) and the [Service Token Delete](#service-token-delete) actions with a single request.
11097+
11098+
When using this command, at least one of `kubeconfig` or `servicetoken` is required.
11099+
11100+
**Note**: When regenerating a service account token, the Cluster's control plane components and Linode CSI drivers are also restarted and configured with the new token. High Availability Clusters should not experience any disruption, while standard Clusters may experience brief control plane downtime while components are restarted.
11101+
requestBody:
11102+
description: The Kubernetes Cluster Regenerate request object.
11103+
content:
11104+
application/json:
11105+
schema:
11106+
properties:
11107+
kubeconfig:
11108+
type: boolean
11109+
default: false
11110+
example: true
11111+
description: |
11112+
Whether to delete and regenerate the Kubeconfig file for this Cluster.
11113+
servicetoken:
11114+
type: boolean
11115+
default: false
11116+
example: true
11117+
description: |
11118+
Whether to delete and regenerate the service access token for this Cluster.
11119+
responses:
11120+
'200':
11121+
description: Regenerate request successful.
11122+
content:
11123+
application/json:
11124+
schema:
11125+
type: object
11126+
default:
11127+
$ref: '#/components/responses/ErrorResponse'
11128+
x-code-samples:
11129+
- lang: Shell
11130+
source: >
11131+
curl -H "Content-Type: application/json" \
11132+
-H "Authorization: Bearer $TOKEN" \
11133+
-X POST -d '{
11134+
"kubeconfig": true;
11135+
"servicetoken": true
11136+
}' \
11137+
https://api.linode.com/v4/lke/clusters/12345/regenerate
11138+
- lang: CLI
11139+
source: >
11140+
linode-cli lke regenerate 12345 \
11141+
--kubeconfig true \
11142+
--servicetoken true
11143+
/lke/clusters/{clusterId}/servicetoken:
11144+
parameters:
11145+
- name: clusterId
11146+
in: path
11147+
description: ID of the target Kubernetes cluster.
11148+
required: true
11149+
schema:
11150+
type: integer
11151+
x-linode-cli-command: lke
11152+
delete:
11153+
operationId: postLKECServiceTokenDelete
11154+
x-linode-cli-action: service-token-delete
11155+
security:
11156+
- personalAccessToken: []
11157+
- oauth:
11158+
- lke:read_write
11159+
tags:
11160+
- Linode Kubernetes Engine (LKE)
11161+
summary: Service Token Delete
11162+
description: |
11163+
Delete and regenerate the service account token for a Cluster.
11164+
11165+
**Note**: When regenerating a service account token, the Cluster's control plane components and Linode CSI drivers are also restarted and configured with the new token. High Availability Clusters should not experience any disruption, while standard Clusters may experience brief control plane downtime while components are restarted.
11166+
responses:
11167+
'200':
11168+
description: Service token deleted and regenerated successfully.
11169+
content:
11170+
application/json:
11171+
schema:
11172+
type: object
11173+
default:
11174+
$ref: '#/components/responses/ErrorResponse'
11175+
x-code-samples:
11176+
- lang: Shell
11177+
source: >
11178+
curl -H "Authorization: Bearer $TOKEN" \
11179+
-X DELETE \
11180+
https://api.linode.com/v4/lke/clusters/12345/servicetoken
11181+
- lang: CLI
11182+
source: >
11183+
linode-cli lke service-token-delete 12345
1107411184
/lke/versions:
1107511185
x-linode-cli-command: lke
1107611186
get:

0 commit comments

Comments
 (0)