Skip to content

Commit e7a6749

Browse files
authored
Merge pull request kubernetes#2325 from khenidak/kep-updates
dualstack kep updates
2 parents 996261d + ae4cd72 commit e7a6749

File tree

1 file changed

+198
-5
lines changed

1 file changed

+198
-5
lines changed

keps/sig-network/563-dual-stack/README.md

Lines changed: 198 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@
5858
- [Changes Required](#changes-required)
5959
- [Test Plan](#test-plan)
6060
- [Graduation Criteria](#graduation-criteria)
61+
- [Production Readiness Review Questionnaire](#production-readiness-review-questionnaire)
62+
- [Feature Enablement and Rollback](#feature-enablement-and-rollback)
63+
- [Rollout, Upgrade and Rollback Planning](#rollout-upgrade-and-rollback-planning)
64+
- [Monitoring Requirements](#monitoring-requirements)
65+
- [Dependencies](#dependencies)
66+
- [Scalability](#scalability)
67+
- [Troubleshooting](#troubleshooting)
6168
<!-- /toc -->
6269

6370
## Summary
@@ -142,6 +149,8 @@ communication to, from and within a Kubernetes cluster.
142149
proposal. Communication about how to enable dual-stack functionality will be
143150
documented appropriately in-order so that aformentioned tools may choose to
144151
enable it for use.
152+
- Enable Kubernetes api-server dual-stack addresses listening and binding. Additionally
153+
enable dualstack for Kubernetes default service.
145154

146155
## Proposal
147156

@@ -247,7 +256,7 @@ Pod.IPs[0] == Pod.IP which will look like the following:
247256
```
248257

249258
CNI as of today does not provide additional metadata to the IP. So this
250-
Properties field - speced in this KEP - will be empty until CNI spec includes
259+
Properties field - speced in this KEP - will not be added until CNI spec includes
251260
properties. Although in theory we can copy the interface name, gateway etc.
252261
into this Properties map.
253262

@@ -971,16 +980,21 @@ CoreDNS will need to make changes in order to support the plural form of
971980
endpoint addresses. Some other considerations of CoreDNS support for
972981
dual-stack:
973982
974-
- Because service IPs will remain single-family, pods will continue to access
975-
the CoreDNS server via a single service IP. In other words, the nameserver
976-
entries in a pod's /etc/resolv.conf will typically be a single IPv4 or single
977-
IPv6 address, depending upon the IP family of the cluster's service CIDR.
983+
- For dual-stack services, CoreDNS read the endpoint slices generated for each IPFamily
984+
and create the corresponding A and AAAA records for the service.
985+
- For single-stack services, CoreDNS will operate as is. Service IPs will remain
986+
single-family, pods will continue to access the CoreDNS server via a single service
987+
IP. In other words, the nameserver entries in a pod's /etc/resolv.conf will typically
988+
be a single IPv4 or single IPv6 address, depending upon the IP family of the cluster's
989+
service CIDR.
978990
- Non-headless Kubernetes services: CoreDNS will resolve these services to
979991
either an IPv4 entry (A record) or an IPv6 entry (AAAA record), depending
980992
upon the IP family of the cluster's service CIDR.
981993
- Headless Kubernetes services: CoreDNS will resolve these services to either
982994
an IPv4 entry (A record), an IPv6 entry (AAAA record), or both, depending on
983995
the service's `ipFamily`.
996+
- Once Kubernetes service (pointing to Cluster DNS) is converted to dualstack pods
997+
will automatically get two DNS servers (one for each IP family) in their resolv.conf.
984998
985999
### Ingress Controller Operation
9861000
@@ -1320,3 +1334,182 @@ This capability will move to stable when the following criteria have been met.
13201334
* e2e test successfully running on two platforms
13211335
* testing ingress controller infrastructure with updated dual-stack services
13221336
* dualstack tests run as pre-submit blocking for PRs
1337+
1338+
1339+
## Production Readiness Review Questionnaire
1340+
1341+
### Feature Enablement and Rollback
1342+
1343+
1344+
* **How can this feature be enabled / disabled in a live cluster?**
1345+
- [X] Feature gate (also fill in values in `kep.yaml`)
1346+
- Feature gate name: IPv6DualStack
1347+
- Components depending on the feature gate: kube-apiserver, kube-controller-manager, kube-proxy, and kubelet
1348+
- [ ] Other
1349+
- Describe the mechanism:
1350+
- Will enabling / disabling the feature require downtime of the control
1351+
plane?
1352+
- Will enabling / disabling the feature require downtime or reprovisioning
1353+
of a node? (Do not assume `Dynamic Kubelet Config` feature is enabled).
1354+
1355+
* **Does enabling the feature change any default behavior?**
1356+
No. Pods and Services will remain single stack until cli flags have been modified
1357+
as described in this KEP. Once modified, existing and new services will remain
1358+
single stack until user requests otherwise. Pods will become dual-stack however
1359+
it will maintain the same ipfamily used in before enabling feature flag.
1360+
1361+
* **Can the feature be disabled once it has been enabled (i.e. can we roll back
1362+
the enablement)?**
1363+
Yes.
1364+
1365+
* **What happens if we reenable the feature if it was previously rolled back?**
1366+
Similar to enable it the first time on a cluster.
1367+
1368+
* **Are there any tests for feature enablement/disablement?**
1369+
The feature is being tested using integration tests with gate on/off. The
1370+
tests can be found here: https://github.com/kubernetes/kubernetes/tree/master/test/integration/dualstack
1371+
1372+
The feature is being tested on -some of - the cloud providers and kind.
1373+
1. https://testgrid.k8s.io/sig-network-dualstack-azure-e2e. This has all dualstack tests on azure.
1374+
2. kind dual-stack iptables: https://testgrid.k8s.io/sig-network-kind#sig-network-kind,%20dual,%20master
1375+
3. kind dual-stack ipvs: https://testgrid.k8s.io/sig-network-kind#sig-network-kind,%20ipvs,%20master
1376+
1377+
### Rollout, Upgrade and Rollback Planning
1378+
1379+
* **How can a rollout fail? Can it impact already running workloads?**
1380+
Try to be as paranoid as possible - e.g., what if some components will restart
1381+
mid-rollout?
1382+
Users **must** avoid changing existing cidrs. For both pods and services. Users
1383+
can only add to alternative ip family to existing cidrs. Changing existing cidrs
1384+
will result in nondeterministic failures depending on how the cluster networking
1385+
was configured.
1386+
1387+
Existing workloads are not expected to be impacted during rollout. A component restart
1388+
during rollout might delay generating endpoint and endpoint slices for alternative IP families
1389+
if there are *new* workloads that depend on them they will fail.
1390+
1391+
* **What specific metrics should inform a rollback?**
1392+
N/A
1393+
1394+
* **Were upgrade and rollback tested? Was the upgrade->downgrade->upgrade path tested?**
1395+
Describe manual testing that was done and the outcomes.
1396+
Longer term, we may want to require automated upgrade/rollback tests, but we
1397+
are missing a bunch of machinery and tooling and can't do that now.
1398+
1399+
* **Is the rollout accompanied by any deprecations and/or removals of features, APIs,
1400+
fields of API types, flags, etc.?**
1401+
Even if applying deprecation policies, they may still surprise some users.
1402+
1403+
### Monitoring Requirements
1404+
1405+
* **How can an operator determine if the feature is in use by workloads?**
1406+
Ideally, this should be a metric. Operations against the Kubernetes API (e.g.,
1407+
checking if there are objects with field X set) may be a last resort. Avoid
1408+
logs or events for this purpose.
1409+
1410+
Operators can determine if the feature is in use by listing services that
1411+
employ dual-stack. This can be done via
1412+
1413+
```
1414+
kubectl get services --all-namespaces spec.ipFamilyPolicy!=SingleStack
1415+
```
1416+
1417+
* **What are the SLIs (Service Level Indicators) an operator can use to determine
1418+
the health of the service?**
1419+
- [ ] Metrics
1420+
- Metric name:
1421+
- [Optional] Aggregation method:
1422+
- Components exposing the metric:
1423+
- [ ] Other (treat as last resort)
1424+
- Details:
1425+
1426+
* **What are the reasonable SLOs (Service Level Objectives) for the above SLIs?**
1427+
At a high level, this usually will be in the form of "high percentile of SLI
1428+
per day <= X". It's impossible to provide comprehensive guidance, but at the very
1429+
high level (needs more precise definitions) those may be things like:
1430+
- per-day percentage of API calls finishing with 5XX errors <= 1%
1431+
- 99% percentile over day of absolute value from (job creation time minus expected
1432+
job creation time) for cron job <= 10%
1433+
- 99,9% of /health requests per day finish with 200 code
1434+
1435+
* **Are there any missing metrics that would be useful to have to improve observability
1436+
of this feature?**
1437+
Describe the metrics themselves and the reasons why they weren't added (e.g., cost,
1438+
implementation difficulties, etc.).
1439+
1440+
### Dependencies
1441+
1442+
* **Does this feature depend on any specific services running in the cluster?**
1443+
Think about both cluster-level services (e.g. metrics-server) as well
1444+
as node-level agents (e.g. specific version of CRI). Focus on external or
1445+
optional services that are needed. For example, if this feature depends on
1446+
a cloud provider API, or upon an external software-defined storage or network
1447+
control plane.
1448+
1449+
This feature does not have dependency beyond kube-apiserver and standard controllers
1450+
shipped with Kubernetes releases.
1451+
1452+
### Scalability
1453+
1454+
* **Will enabling / using this feature result in any new API calls?**
1455+
No
1456+
1457+
* **Will enabling / using this feature result in introducing new API types?**
1458+
No
1459+
1460+
* **Will enabling / using this feature result in any new calls to the cloud
1461+
provider?**
1462+
No
1463+
1464+
* **Will enabling / using this feature result in increasing size or count of
1465+
the existing API objects?**
1466+
Enabling this feature increases the size of Service object. The service
1467+
object has three new fields. The additional fields represent estimated
1468+
less than 512B.
1469+
1470+
* **Will enabling / using this feature result in increasing time taken by any
1471+
operations covered by [existing SLIs/SLOs]?**
1472+
No
1473+
1474+
* **Will enabling / using this feature result in non-negligible increase of
1475+
resource usage (CPU, RAM, disk, IO, ...) in any components?**
1476+
No
1477+
1478+
### Troubleshooting
1479+
1480+
The Troubleshooting section currently serves the `Playbook` role. We may consider
1481+
splitting it into a dedicated `Playbook` document (potentially with some monitoring
1482+
details). For now, we leave it here.
1483+
1484+
1485+
* **How does this feature react if the API server and/or etcd is unavailable?**
1486+
This feature will not be operable if either kube-apiserver or etcd is unavailable.
1487+
1488+
* **What are other known failure modes?**
1489+
For each of them, fill in the following information by copying the below template:
1490+
1491+
* Failure to create dual-stack services. Operator must perform the following steps:
1492+
1. Ensure that the cluster has `IPv6DualStack` feature enabled.
1493+
2. Ensure that api-server is correctly configured with multi (dual-stack) service
1494+
cidrs using `--services-cluster-ip-range` flag.
1495+
1496+
* Failure to route traffic to pod backing a dual-stack service. Operator must perform the
1497+
following steps:
1498+
1. Ensure that nodes (where the pod is running) is configured for dual-stack
1499+
a. Node is using dual-stack enabled CNI.
1500+
b. kubelet is configured with dual-stack feature flag.
1501+
c. kube-proxy is configured with dual-stack feature flag.
1502+
2. Ensure that api-server is configured for dual-stack
1503+
a. Feature flag is turned on.
1504+
3. Ensure that kube-controller-manager is configured for dual-stack
1505+
a. Feature flag is turned on.
1506+
b. `--cluster-cidr` cli flag is correctly configured with dual-stack
1507+
where applicable.
1508+
4. Operator can ensure that `endpoints` and `endpointSlices` are correctly
1509+
created for the service in question by using kubectl.
1510+
5. If the pod is using host network then operator must ensure that the node is correctly
1511+
reporting dual-stack addresses.
1512+
1513+
* **What steps should be taken if SLOs are not being met to determine the problem?**
1514+
N/A
1515+

0 commit comments

Comments
 (0)