kubectl plugin to curl the Kubernetes API with your current KUBECONFIG context
sudo cp kubectl-curl.sh /usr/local/bin/kubectl-curl
Pass the path as the 1st argument to kubectl curl
.
$ kubectl curl api
{
"kind": "APIVersions",
"versions": [
"v1"
],
"serverAddressByClientCIDRs": [
{
"clientCIDR": "0.0.0.0/0",
"serverAddress": "10.0.0.1:443"
}
]
}
Subsequent arguments are passed directly to curl
.
The kubectl evict
command can be used to evict a pod by name (after checking the pod disruption budget).
See The Eviction API.
sudo cp kubectl-evict.sh /usr/local/bin/kubectl-evict
The current context's namespace is used (or default), unless another is specified via command line option -n
or --namespace
.
$ kubectl evict inara -n serenity
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {
},
"status": "Success",
"code": 201
}