Skip to content

Tool: kcurl

cdxy edited this page Dec 31, 2020 · 6 revisions

Tool kcurl

连接K8s api-server发起自定义HTTP请求。

Connect K8s api-server with local service account token and make custom HTTP requests.

Usage

help msg and usage:

./cdk kcurl

send request

cdk kcurl (default|anonymous|<service-account-token-path>) (get|post) <url> ["<post-data>"]

default: auth k8s api-server with pod's default service-account token
anonymous: auth k8s api-server with cluster-role "system:anonymous"
<token-path>: auth k8s api-server with user-specified service-account token path

Example

cdk kcurl default get "https://192.168.0.234:6443/api/v1/nodes" ""

Clone this wiki locally