Merge pull request #33856 from fjammes/patch-1

Update socks5-proxy-access-api.md
This commit is contained in:
Kubernetes Prow Robot
2022-06-14 15:19:34 -07:00
committed by GitHub
@@ -87,14 +87,14 @@ When you set the `https_proxy` variable, tools such as `curl` route HTTPS traffi
you configured. For this to work, the tool must support SOCKS5 proxying.
{{< note >}}
In the URL https://localhost/api, `localhost` does not refer to your local client computer.
Instead, it refers to the endpoint on the remote server knows as `localhost`.
In the URL https://localhost:6443/api, `localhost` does not refer to your local client computer.
Instead, it refers to the endpoint on the remote server known as `localhost`.
The `curl` tool sends the hostname from the HTTPS URL over SOCKS, and the remote server
resolves that locally (to an address that belongs to its loopback interface).
{{</ note >}}
```shell
curl -k -v https://localhost/api
curl -k -v https://localhost:6443/api
```
To use the official Kubernetes client `kubectl` with a proxy, set the `proxy-url` element
@@ -105,7 +105,7 @@ apiVersion: v1
clusters:
- cluster:
certificate-authority-data: LRMEMMW2 # shortened for readability
server: https://localhost # the "Kubernetes API" in the diagram above
server: https://<API_SERVER_IP_ADRESS>:6443 # the "Kubernetes API" server, in other words the IP address of kubernetes-remote-server.example
proxy-url: socks5://localhost:1080 # the "SSH SOCKS5 proxy" in the diagram above (DNS resolution over socks is built-in)
name: default
contexts:
@@ -142,4 +142,4 @@ Type `unset https_proxy` in a terminal to stop forwarding http traffic through t
## Further reading
* [OpenSSH remote login client](https://man.openbsd.org/ssh)
* [OpenSSH remote login client](https://man.openbsd.org/ssh)