Skip to content

New LKE recycle and Node View Endpoints #375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
177 changes: 176 additions & 1 deletion openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6517,6 +6517,17 @@ paths:
description: >
An array of tags applied to the Kubernetes cluster. Tags are for organizational purposes only.
To delete a tag, exclude it from your `tags` array.
k8s_version:
type: string
description: >
The desired upgraded Kubernetes version for this Kubernetes cluster in the format of
<major>.<minor>. New and recycled Nodes in this cluster will be installed with the
latest available patch for the Cluster's upgraded Kubernetes version.

When updating the Kubernetes version, only the next latest minor version can be deployed
following the currently deployed version. For example, a cluster with Kubernetes version
1.16 can be upgraded to version 1.17, but not directly to 1.18. The k8s_version can not be
downgraded.
responses:
'200':
description: Returns a single Kubernetes cluster.
Expand Down Expand Up @@ -6554,6 +6565,7 @@ paths:
-X PUT -d '{
"label": "lkecluster54321"
"tags" : ["ecomm", "blog", "prod", "monitoring"]
"k8s_version": "1.17"
}' \
https://api.linode.com/v4/lke/clusters/12345
- lang: CLI
Expand Down Expand Up @@ -6726,6 +6738,50 @@ paths:
linode-cli lke pool-create 12345 \
--type g6-standard-4 \
--count 6
/lke/clusters/{clusterId}/recycle:
parameters:
- name: clusterId
in: path
description: ID of the Kubernetes cluster to be recycled.
required: true
schema:
type: integer
x-linode-cli-command: lke
post:
operationId: postLKEClusterRecycle
x-linode-cli-action: cluster-recycle
security:
- personalAccessToken: []
- oauth:
- lke:read_write
tags:
- Linode Kubernetes Engine (LKE)
summary: Kubernetes Cluster Recycle
description: |
Recycles a designated Kubernetes Cluster. All Linodes within the Cluster will be deleted
and replaced with new Linodes on a rolling basis, which may take several minutes. Replacement Nodes are
installed with the latest available patch for the Cluster's Kubernetes Version.

**Any local storage on deleted Linodes (such as "hostPath" and "emptyDir" volumes, or "local" PersistentVolumes) will be erased.**
responses:
'200':
description: Cluster has been recycled.
content:
application/json:
schema:
type: object
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST \
https://api.linode.com/v4/lke/clusters/12345/recycle
- lang: CLI
source: >
linode-cli lke cluster-recycle 12345
/lke/clusters/{clusterId}/pools/{poolId}:
parameters:
- name: clusterId
Expand Down Expand Up @@ -6918,6 +6974,125 @@ paths:
- lang: CLI
source: >
linode-cli lke pool-recycle 12345 456
/lke/clusters/{clusterID}/nodes/{nodeId}:
parameters:
- name: clusterId
in: path
description: ID of the Kubernetes cluster containing the Node.
required: true
schema:
type: integer
- name: nodeId
in: path
description: ID of the Node to look up.
required: true
schema:
type: string
x-linode-cli-command: lke
get:
operationId: getLKEClusterNode
x-linode-cli-action: node-view
security:
- personalAccessToken: []
- oauth:
- lke:read_write
tags:
- Linode Kubernetes Engine (LKE)
summary: Node View
description: >
Returns the values for a specified node object.
responses:
'200':
description: Returns the values of a node object in the form that it appears currently in the node pool array.
content:
application/json:
schema:
type: object
properties:
data:
type: object
description: >
The selected node in the cluster.
properties:
id:
type: string
readOnly: true
description: >
The Node's ID.
example: "12345-6aa78910bc"
instance_id:
type: integer
description: >
The Linode's ID. If no Linode is currently provisioned for this Node, this is `null`.
example: 123456
status:
type: string
description: >
The Node's status as it pertains to being a Kubernetes node.
enum:
- ready
- not_ready
example: ready
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/lke/clusters/12345/nodes/12345-6aa78910bc
- lang: CLI
source: >
linode-cli lke node-view 123456 12345-6aa78910bc
/lke/clusters/{clusterId}/nodes/{nodeId}/recycle:
parameters:
- name: clusterId
in: path
description: ID of the Kubernetes cluster containing the Node.
required: true
schema:
type: integer
- name: nodeId
in: path
description: ID of the Node to be recycled.
required: true
schema:
type: string
x-linode-cli-command: lke
post:
operationId: postLKEClusterNodeRecycle
x-linode-cli-action: node-recycle
security:
- personalAccessToken: []
- oauth:
- lke:read_write
tags:
- Linode Kubernetes Engine (LKE)
summary: Node Recycle
description: |
Recycles an individual Node in the designated Kubernetes Cluster. The Node will be deleted
and replaced with a new Linode, which may take a few minutes. Replacement Nodes are
installed with the latest available patch for the Cluster's Kubernetes Version.

**Any local storage on deleted Linodes (such as "hostPath" and "emptyDir" volumes, or "local" PersistentVolumes) will be erased.**
responses:
'200':
description: Node has been recycled.
content:
application/json:
schema:
type: object
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST \
https://api.linode.com/v4/lke/clusters/12345/nodes/12345-6aa78910bc/recycle
- lang: CLI
source: >
linode-cli lke node-recycle 12345 12345-6aa78910bc
/lke/clusters/{clusterId}/api-endpoints:
parameters:
- name: clusterId
Expand Down Expand Up @@ -6976,7 +7151,7 @@ paths:
https://api.linode.com/v4/lke/clusters/12345/api-endpoints
- lang: CLI
source: >
linode-cli lke api-endpoint-list 12345
linode-cli lke api-endpoints-list 12345
/lke/clusters/{clusterId}/kubeconfig:
parameters:
- name: clusterId
Expand Down