LinuxCommandLibrary

kubectl-proxy

runs a proxy to the Kubernetes API server

TLDR

Start API proxy
$ kubectl proxy
copy
Proxy on specific port
$ kubectl proxy --port=[8001]
copy
Allow external access
$ kubectl proxy --address=[0.0.0.0] --accept-hosts='.*'
copy
Proxy specific API paths
$ kubectl proxy --api-prefix=/api/
copy

SYNOPSIS

kubectl proxy [options]

DESCRIPTION

kubectl proxy runs a proxy to the Kubernetes API server. Handles authentication and allows accessing the API and services without exposing them directly. Default port is 8001.

PARAMETERS

--port port

Port to run proxy on.
--address address
Address to bind to.
--accept-hosts regex
Hosts to accept requests from.
--api-prefix prefix
API prefix for proxy.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard