You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In retrospect, having an explicit level of indirection that separates user-initiated network traffic from API
48
48
server-initiated traffic is a useful concept.
49
49
Cloud providers want to control how API server to pod, node and service network traffic is implemented.
50
50
Cloud providers may choose to run their API server (control network) and the cluster nodes (cluster network)
51
51
on isolated networks. The control and cluster networks may have overlapping IP addresses.
52
-
There for they require a nonIP routing layer (SSH tunnel are an example).
52
+
Therefore they require a non-IP routing proxy layer (SSH tunnel are an example).
53
53
Adding this layer enables metadata audit logging. It allows validation of outgoing API server connections.
54
54
Structuring the API server in this way is a forcing function for keeping architectural layering violations out of apiserver.
55
55
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
58
58
### Goals
59
59
60
60
Delete the SSH Tunnel/Node Dialer code from Kube APIServer.
61
-
Enable admins to fixhttps://groups.google.com/d/msg/kubernetes-security-announce/tyd-MVR-tY4/tyREP9-qAwAJ.
61
+
Enable admins to mitigatehttps://groups.google.com/d/msg/kubernetes-security-announce/tyd-MVR-tY4/tyREP9-qAwAJ.
62
62
Allow isolation of the Control network from the Cluster network.
63
63
64
64
### Non-Goals
65
65
66
66
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.)
68
68
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.)
70
70
71
71
## Definitions
72
72
@@ -83,7 +83,7 @@ Later version may relax the all node requirement to some.
83
83
The dialer provided depends on NetworkContext information.
84
84
-**Konnectivity Server** The proxy server which runs in the control plane network.
85
85
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.
87
87
If the former it would exposes a gRPC interface to KAS to provide connectivity service.
88
88
If the latter it would use standard HTTP Connect.
89
89
Formerly known the the Network Proxy Server.
@@ -103,7 +103,7 @@ For scalability we will be looking at the number of required open connections.
103
103
Increasing usage of webhooks means we need better than 1 request per connection (multiplexing).
104
104
We also need the tunnel to be tolerant of errors in the requests it is transporting.
105
105
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.
107
107
However this means that we cannot have the KAS perform a DNS request to then do a follow on request.
108
108
If no issues are found with HTTP Connect in these areas we will proceed with it.
109
109
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.
112
112
It may be desirable to allow out of band data (metadata) to be transmitted from the KAS to the Proxy Server.
113
113
We expect to handle metadata in the HTTP Connect case using http 'X' headers on the Connect request.
114
114
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.
116
116
In this case the metadata can be sent even during tunnel usage.
117
117
118
118
Each connectivity proxy allows secure connections to one or more cluster networks.
@@ -174,12 +174,12 @@ type NetworkContext struct {
174
174
EgressSelectionName specifies the network to route traffic to.
175
175
The KAS starts with a list of registered konnectivity service names. These
176
176
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.
178
178
179
179
The KAS starts with a proxy configuration like the below example.
180
180
The example specifies 4 networks. "direct" specifies the KAS talking directly
181
181
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
183
183
listening at 1.2.3.5:5679. While these are represented as resources
184
184
they are not intended to be loaded dynamically. The names are not case
185
185
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
246
246
It listens on a port for gRPC connections from the KAS.
247
247
This port would be for forwarding traffic to the appropriate cluster.
248
248
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.
250
251
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.
253
254
254
255
### Direct Connection
255
256
@@ -289,9 +290,8 @@ Admission webhooks can be destined for a service or a URL.
289
290
If destined for a service then the service rules apply (send to 'cluster').
290
291
If destined for a URL then we will use the ‘controlplane’ NetworkContext.
291
292
-**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.
293
294
If destined for a service then the service rules apply.
294
-
If destined for a URL then we will use the ‘controlplane’ NetworkContext.
295
295
-**Authentication, Authorization and Audit Webhooks**
296
296
These Webhooks use a kube config file to determine destination.
297
297
Given that we use a ‘controlplane’ NetworkContext.
@@ -408,6 +408,8 @@ Beta:
408
408
- Feature went Alpha in 1.16 with limited functionality. It will cover the log
409
409
sub resource and communication to the etcd server.
410
410
411
+
- Feature went Beta in 1.18.
412
+
411
413
## Alternatives [optional]
412
414
413
415
- 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:
416
418
417
419
## Infrastructure Needed [optional]
418
420
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.
420
422
The network proxy provided is meant as a reference implementation. Users as expected to extend it for their needs.
0 commit comments