Skip to content

Commit ab4d565

Browse files
committed
Add LKE cluster and service token regenerate commands
1 parent e458fda commit ab4d565

File tree

1 file changed

+106
-0
lines changed

1 file changed

+106
-0
lines changed

openapi.yaml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11071,6 +11071,112 @@ 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+
requestBody:
11100+
description: The Kubernetes Cluster Regenerate request object.
11101+
content:
11102+
application/json:
11103+
schema:
11104+
properties:
11105+
kubeconfig:
11106+
type: boolean
11107+
default: false
11108+
example: true
11109+
description: |
11110+
Whether to delete and regenerate the Kubeconfig file for this Cluster.
11111+
servicetoken:
11112+
type: boolean
11113+
default: false
11114+
example: true
11115+
description: |
11116+
Whether to delete and regenerate the service access token for this Cluster.
11117+
responses:
11118+
'200':
11119+
description: Regenerate request successful.
11120+
content:
11121+
application/json:
11122+
schema:
11123+
type: object
11124+
default:
11125+
$ref: '#/components/responses/ErrorResponse'
11126+
x-code-samples:
11127+
- lang: Shell
11128+
source: >
11129+
curl -H "Content-Type: application/json" \
11130+
-H "Authorization: Bearer $TOKEN" \
11131+
-X POST -d '{
11132+
"kubeconfig": true;
11133+
"servicetoken": true
11134+
}' \
11135+
https://api.linode.com/v4/lke/clusters/12345/regenerate
11136+
- lang: CLI
11137+
source: >
11138+
linode-cli lke regenerate 12345 \
11139+
--kubeconfig true \
11140+
--servicetoken true
11141+
/lke/clusters/{clusterId}/servicetoken:
11142+
parameters:
11143+
- name: clusterId
11144+
in: path
11145+
description: ID of the target Kubernetes cluster.
11146+
required: true
11147+
schema:
11148+
type: integer
11149+
x-linode-cli-command: lke
11150+
delete:
11151+
operationId: postLKECServiceTokenDelete
11152+
x-linode-cli-action: service-token-delete
11153+
security:
11154+
- personalAccessToken: []
11155+
- oauth:
11156+
- lke:read_write
11157+
tags:
11158+
- Linode Kubernetes Engine (LKE)
11159+
summary: Service Token Delete
11160+
description: |
11161+
Delete and regenerate the service account token for a Cluster.
11162+
responses:
11163+
'200':
11164+
description: Service token deleted and regenerated successfully.
11165+
content:
11166+
application/json:
11167+
schema:
11168+
type: object
11169+
default:
11170+
$ref: '#/components/responses/ErrorResponse'
11171+
x-code-samples:
11172+
- lang: Shell
11173+
source: >
11174+
curl -H "Authorization: Bearer $TOKEN" \
11175+
-X DELETE \
11176+
https://api.linode.com/v4/lke/clusters/12345/servicetoken
11177+
- lang: CLI
11178+
source: >
11179+
linode-cli lke service-token-delete 12345
1107411180
/lke/versions:
1107511181
x-linode-cli-command: lke
1107611182
get:

0 commit comments

Comments
 (0)