Skip to content

[New ] GET /lke/clusters/{clusterId}/api-endpoints #241

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
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
71 changes: 71 additions & 0 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6585,6 +6585,73 @@ paths:
- lang: CLI
source: >
linode-cli lke pool-delete 12345 456
/lke/clusters/{clusterId}/api-endpoints:
parameters:
- name: clusterId
in: path
description: ID of the Kubernetes cluster to look up.
required: true
schema:
type: integer
x-linode-cli-command: lke
get:
operationId: getLKEClusterAPIEndpoints
x-linode-cli-action: api-endpoints-list
security:
- personalAccessToken: []
- oauth:
- lke:read_only
tags:
- Linode Kubernetes Engine (LKE)
servers:
- url: https://api.linode.com/v4beta
summary: List Kubernetes API Endpoints
description: >
List the Kubernetes API server endpoints for this cluster. Please note that it often takes
2-5 minutes before the endpoint is ready after first [creating a new cluster](/api/v4/lke-clusters/#post).


**Beta**: This endpoint is in private beta. Please make sure to prepend all requests with
`/v4beta` instead of `/v4`, and be aware that this endpoint may receive breaking
updates in the future. This notice will be removed when this endpoint is out of
beta. Sign up for the beta [here](https://welcome.linode.com/lkebeta/).
responses:
'200':
description: Returns the Kubernetes API server endpoints for this cluster.
content:
application/json:
schema:
type: object
properties:
Copy link
Contributor

@adammohammed adammohammed Apr 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to renaming this endpoint, the return structure changed to be more in line with the rest of the API.
Now the response looks something like this

{
  "results": 2,
  "pages": 1,
  "page": 1,
  "data": [{"endpoint": "https://207.xxx.xxx.xxx:443"},{"endpoint": "https://207.xxx.xxx.xxx:6443"}],
}

data:
type: array
items:
type: object
description: >
The Kubernetes API server endpoints for this cluster.
properties:
endpoint:
type: string
readOnly: true
description: >
A Kubernetes API server endpoint for this cluster.
example: "https://192.0.2.1:6443"
page:
$ref: '#/components/schemas/PaginationEnvelope/properties/page'
pages:
$ref: '#/components/schemas/PaginationEnvelope/properties/pages'
results:
$ref: '#/components/schemas/PaginationEnvelope/properties/results'
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4beta/lke/clusters/12345/api-endpoints
- lang: CLI
source: >
linode-cli lke api-endpoint-list 12345
/lke/clusters/{clusterId}/api-endpoint:
parameters:
- name: clusterId
Expand All @@ -6610,6 +6677,10 @@ paths:
Get the Kubernetes API server endpoint for this cluster.


**Note** This endpoint will be deprecated in favor of
[List Kubernetes API Endpoints](/api/v4/lke-clusters-cluster-id-api-endpoints).


**Beta**: This endpoint is in private beta. Please make sure to prepend all requests with
`/v4beta` instead of `/v4`, and be aware that this endpoint may receive breaking
updates in the future. This notice will be removed when this endpoint is out of
Expand Down