Skip to content

Commit d3688bc

Browse files
committed
KEP-1281: fix inaccuracies and some small cosmetic improvements.
1 parent 08ee952 commit d3688bc

File tree

1 file changed

+20
-18
lines changed
  • keps/sig-api-machinery/1281-network-proxy

1 file changed

+20
-18
lines changed

keps/sig-api-machinery/1281-network-proxy/README.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ default behavior is insufficient.
4040

4141
## Motivation
4242

43-
Kubernetes has outgrown the [SSH tunnels](https://github.com/kubernetes/kubernetes/issues/54076).
44-
They complicate KAS code and only one cloud provider implemented them.
45-
After a year of deprecation time, they will be removed in an upcoming release.
43+
Historically, Kubernetes used [SSH tunnels](https://github.com/kubernetes/kubernetes/issues/54076), but they only
44+
functioned on GCE; they were deprecated in 1.9 and [removed in
45+
1.22](https://github.com/kubernetes/kubernetes/pull/102297).
4646

4747
In retrospect, having an explicit level of indirection that separates user-initiated network traffic from API
4848
server-initiated traffic is a useful concept.
4949
Cloud providers want to control how API server to pod, node and service network traffic is implemented.
5050
Cloud providers may choose to run their API server (control network) and the cluster nodes (cluster network)
5151
on isolated networks. The control and cluster networks may have overlapping IP addresses.
52-
There for they require a non IP routing layer (SSH tunnel are an example).
52+
Therefore they require a non-IP routing proxy layer (SSH tunnel are an example).
5353
Adding this layer enables metadata audit logging. It allows validation of outgoing API server connections.
5454
Structuring the API server in this way is a forcing function for keeping architectural layering violations out of apiserver.
5555
In combination with a firewall, this separation of networks protects against security concerns such as
@@ -58,15 +58,15 @@ In combination with a firewall, this separation of networks protects against sec
5858
### Goals
5959

6060
Delete the SSH Tunnel/Node Dialer code from Kube APIServer.
61-
Enable admins to fix https://groups.google.com/d/msg/kubernetes-security-announce/tyd-MVR-tY4/tyREP9-qAwAJ.
61+
Enable admins to mitigate https://groups.google.com/d/msg/kubernetes-security-announce/tyd-MVR-tY4/tyREP9-qAwAJ.
6262
Allow isolation of the Control network from the Cluster network.
6363

6464
### Non-Goals
6565

6666
Build a general purpose Proxy which does everything. (Users should build their own
67-
custom proxies with the desired behavior, based on the provided proxy)
67+
custom proxies with the desired behavior, based on the provided proxy.)
6868
Handle requests from the Cluster to the Control Plane. (The proxy can be extended to
69-
do this. However that is left to the User if they want that behavior)
69+
do this. However that is left to the User if they want that behavior.)
7070

7171
## Definitions
7272

@@ -83,7 +83,7 @@ Later version may relax the all node requirement to some.
8383
The dialer provided depends on NetworkContext information.
8484
- **Konnectivity Server** The proxy server which runs in the control plane network.
8585
It has a secure channel established to the cluster network.
86-
It could work on either a HTTP Connect mechanism or gRPC.
86+
It could work on either a gRPC or HTTP Connect mechanism.
8787
If the former it would exposes a gRPC interface to KAS to provide connectivity service.
8888
If the latter it would use standard HTTP Connect.
8989
Formerly known the the Network Proxy Server.
@@ -103,7 +103,7 @@ For scalability we will be looking at the number of required open connections.
103103
Increasing usage of webhooks means we need better than 1 request per connection (multiplexing).
104104
We also need the tunnel to be tolerant of errors in the requests it is transporting.
105105
HTTP-Connect only supports HTTP requests and not things like DNS requests.
106-
We assume that for HTTP URL request,s it will be the proxy which does the DNS lookup.
106+
We assume that for HTTP URL requests, it will be the proxy which does the DNS lookup.
107107
However this means that we cannot have the KAS perform a DNS request to then do a follow on request.
108108
If no issues are found with HTTP Connect in these areas we will proceed with it.
109109
If an issue is found then we will update the KEP and switch the client to the gRPC solution.
@@ -112,7 +112,7 @@ This should be as simple as switching the connection mode of the client code.
112112
It may be desirable to allow out of band data (metadata) to be transmitted from the KAS to the Proxy Server.
113113
We expect to handle metadata in the HTTP Connect case using http 'X' headers on the Connect request.
114114
This means that the metadata can only be sent when establishing a KAS to Proxy tunnel.
115-
For the GRPC case we just update the interface to the KAS.
115+
For the gRPC case we just update the interface to the KAS.
116116
In this case the metadata can be sent even during tunnel usage.
117117

118118
Each connectivity proxy allows secure connections to one or more cluster networks.
@@ -174,12 +174,12 @@ type NetworkContext struct {
174174
EgressSelectionName specifies the network to route traffic to.
175175
The KAS starts with a list of registered konnectivity service names. These
176176
correspond to networks we route traffic to. So the KAS knows where to
177-
proxy the traffic to, otherwise it return an “Unknown network” error.
177+
proxy the traffic to, otherwise it returns an “Unknown network” error.
178178

179179
The KAS starts with a proxy configuration like the below example.
180180
The example specifies 4 networks. "direct" specifies the KAS talking directly
181181
on the local network (no proxy). "controlplane" specifies the KAS talks to a proxy
182-
listening at 1.2.3.4:5678. "cluster" specifies the KAS talk to a proxy
182+
listening at 1.2.3.4:5678. "cluster" specifies the KAS talks to a proxy
183183
listening at 1.2.3.5:5679. While these are represented as resources
184184
they are not intended to be loaded dynamically. The names are not case
185185
sensitive. The KAS loads this resource list as a configuration at start time.
@@ -246,10 +246,11 @@ It should run on the same machine and must run in the same flat network as the K
246246
It listens on a port for gRPC connections from the KAS.
247247
This port would be for forwarding traffic to the appropriate cluster.
248248
It should have an administrative port speaking https.
249-
The administrative port serves the liveness probe and metrics.
249+
The administrative port serves metrics and (optional) debug/pprof handlers.
250+
It should have a health check port, serving liveness and readiness probes.
250251
The liveness probe prevents a partially broken cluster
251-
where the KAS cannot connect to the cluster. This port also serves
252-
pprof debug commands and monitoring data for the proxy.
252+
where the KAS cannot connect to the cluster.
253+
The readiness probe indicates that at least one Konnectivity Agent is connected.
253254

254255
### Direct Connection
255256

@@ -289,9 +290,8 @@ Admission webhooks can be destined for a service or a URL.
289290
If destined for a service then the service rules apply (send to 'cluster').
290291
If destined for a URL then we will use the ‘controlplane’ NetworkContext.
291292
- **Aggregated API Server (and OpenAPI requests for aggregated resources)**
292-
Aggregated API Servers can be destined for a service or a URL.
293+
Aggregated API Servers can be destined for a service.
293294
If destined for a service then the service rules apply.
294-
If destined for a URL then we will use the ‘controlplane’ NetworkContext.
295295
- **Authentication, Authorization and Audit Webhooks**
296296
These Webhooks use a kube config file to determine destination.
297297
Given that we use a ‘controlplane’ NetworkContext.
@@ -408,6 +408,8 @@ Beta:
408408
- Feature went Alpha in 1.16 with limited functionality. It will cover the log
409409
sub resource and communication to the etcd server.
410410

411+
- Feature went Beta in 1.18.
412+
411413
## Alternatives [optional]
412414

413415
- Leave SSH Tunnels (deprecated) in the KAS. Prevents us from making the KAS cloud provider agnostic. Blocks out of tree effort.
@@ -416,5 +418,5 @@ Beta:
416418

417419
## Infrastructure Needed [optional]
418420

419-
Any one wishing to use this feature will need to create network proxy images/pods on the control plane and set up the ConnectivityServiceConfiguration.
421+
Any one wishing to use this feature will need to create network proxy images/pods on the control plane and set up the EgressSelectorConfiguration.
420422
The network proxy provided is meant as a reference implementation. Users as expected to extend it for their needs.

0 commit comments

Comments
 (0)