Skip to content

Commit 4b80a55

Browse files
authored
Merge pull request #2 from bridgetkromhout/updates-to-563
Additional updates
2 parents ec33a9c + cd2ceaf commit 4b80a55

File tree

1 file changed

+64
-28
lines changed

1 file changed

+64
-28
lines changed

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

Lines changed: 64 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,22 +1391,27 @@ This capability will move to stable when the following criteria have been met.
13911391
- Components depending on the feature gate: kube-apiserver, kube-controller-manager, kube-proxy, and kubelet
13921392
13931393
* **Does enabling the feature change any default behavior?**
1394-
No. Pods and Services will remain single stack until cli flags have been modified
1394+
Pods and Services will remain single-stack until cli flags have been modified
13951395
as described in this KEP. Once modified, existing and new services will remain
1396-
single stack until user requests otherwise. Pods will become dual-stack however
1397-
it will maintain the same ipfamily used in before enabling feature flag.
1396+
single-stack until user requests otherwise. Pods will become dual-stack
1397+
however will maintain the same ipfamily used before enabling feature flag.
13981398
13991399
* **Can the feature be disabled once it has been enabled (i.e. can we roll back
14001400
the enablement)?**
1401-
Yes. If we disable the feature gate, we must remove the CLI parameters. An
1402-
older client won't see or be able to use the new fields.
1401+
Yes. If you decide to turn off dual-stack after turning on, ensure all
1402+
services are converted to single-stack first (switch ipfamily to single-stack
1403+
on all services) and then disable the feature. Remove the CLI parameters, as
1404+
an older client won't see or be able to use the new fields. When the user
1405+
disables dual-stack from the controller manager, new endpoints will no longer
1406+
carry two sets, while existing endpoints may not be updated.
14031407
14041408
* **What happens if we reenable the feature if it was previously rolled back?**
1405-
Similar to enabling it the first time on a cluster. We don't load balance
1406-
across IP families, and with no selectors we don't get endpoints. If you use
1407-
the feature flag to turn off dual-stack, we do not edit your service. If you
1409+
Whatever the user has defined will not change without intervention. If you
14081410
disable dual-stack from the controller manager, the service will be given
1409-
single-stack endpoints.
1411+
single-stack endpoints. If you enable dual-stack again, it's as if you're
1412+
enabling it for the first time on a cluster. We don't load balance across IP
1413+
families, and with no selectors we don't get endpoints. If you use the
1414+
feature flag to turn off dual-stack, we do not edit user input.
14101415
14111416
* **Are there any tests for feature enablement/disablement?**
14121417
The feature is being tested using integration tests with gate on/off. The
@@ -1420,14 +1425,23 @@ This capability will move to stable when the following criteria have been met.
14201425
### Rollout, Upgrade and Rollback Planning
14211426
14221427
* **How can a rollout fail? Can it impact already running workloads?**
1423-
Users **must** avoid changing existing cidrs. For both pods and services. Users
1424-
can only add to alternative ip family to existing cidrs. Changing existing cidrs
1425-
will result in nondeterministic failures depending on how the cluster networking
1426-
was configured.
1427-
1428-
Existing workloads are not expected to be impacted during rollout. A component restart
1429-
during rollout might delay generating endpoint and endpoint slices for alternative IP families
1430-
if there are *new* workloads that depend on them they will fail.
1428+
Users **must** avoid changing existing CIDRs for both pods and services.
1429+
Users can only add an alternative ip family to existing CIDRs. Changing
1430+
existing CIDRs will result in nondeterministic failures depending on how the
1431+
cluster networking was configured.
1432+
1433+
Existing workloads are not expected to be impacted during rollout. When you
1434+
disable dual-stack, existing routes aren't deleted. A component restart
1435+
during rollout might delay generating endpoint and endpoint slices for
1436+
alternative IP families. If there are *new* workloads that depend on them,
1437+
they will fail.
1438+
1439+
Imbalance is possible if a replica set scales up or ipv6 gets turned off and
1440+
the endpoint controller has not yet updated, but iptables and the service
1441+
controller manager won't look at endpoints that are flagged off. (Endpoints
1442+
can exist and not be used.) For services, the user will get an error
1443+
immediately. If the existing rules are removed but new ones don't resolve
1444+
correctly yet, then it has a chance to resolve on the next loop.
14311445
14321446
* **What specific metrics should inform a rollback?**
14331447
N/A
@@ -1455,31 +1469,38 @@ fields of API types, flags, etc.?**
14551469
14561470
* **What are the SLIs (Service Level Indicators) an operator can use to determine
14571471
the health of the service?**
1458-
Dual-stack networking is a functional addition, not a service with SLIs.
1472+
Dual-stack networking is a functional addition, not a service with SLIs. Use
1473+
existing metrics for kubelet pod creation and service creation to determine
1474+
service health. [Validate
1475+
IPv4/IPv6 dual-stack](https://kubernetes.io/docs/tasks/network/validate-dual-stack/)
1476+
to ensure that node addressing, pod addressing, and services are configured
1477+
correctly. If dual-stack services are created, they have passed validation.
14591478
14601479
* **What are the reasonable SLOs (Service Level Objectives) for the above SLIs?**
1461-
N/A
1480+
Existing kubelet pod creation and service creation SLOs are what is needed.
14621481
14631482
* **Are there any missing metrics that would be useful to have to improve observability
14641483
of this feature?**
14651484
14661485
1. For services:
14671486
1468-
Services are not in the path of pod creation. Thus, any malfunction or
1469-
bugs in services will not affect pods.
1487+
Whether a cluster is converted to dual-stack or converted back to
1488+
single-stack, services will remain the same because the dual-stack
1489+
conversation does not change user data.
14701490
14711491
Services/Endpoint selection is not in path of pod creation. It runs in
1472-
kube-controller-manager, thus this is N/A.
1492+
kube-controller-manager, so any malfunction will not affect pods.
14731493
14741494
2. For pods:
14751495
14761496
Dual-stack components are not in path of pod creation. It is in the path
14771497
of reporting pod ips. So pod creation will not be affected; if it is
1478-
affected, then it is a CNI issue.
1498+
affected, then it is a CNI issue (entirely separate from dual-stack).
14791499
14801500
Dual-stack components are in the path of PodIPs reporting which affects
14811501
kubelet. If there is a problem (or if there are persistent problems)
1482-
then disabling the featuregate on api-server will mitigate.
1502+
then it is migitated by disabling the feature gate, which turns it off
1503+
for kube-apiserver, kube-controller-manager, kube-proxy, and kubelet.
14831504
14841505
### Dependencies
14851506
@@ -1497,8 +1518,7 @@ of this feature?**
14971518
14981519
* **Will enabling / using this feature result in any new calls to the cloud
14991520
provider?**
1500-
No. Errors are surfaced when the user makes a call. We don't focus on
1501-
metrics-server at this point.
1521+
No. IP allocation for services only involves the API server.
15021522
15031523
* **Will enabling / using this feature result in increasing size or count of
15041524
the existing API objects?**
@@ -1524,7 +1544,7 @@ resource usage (CPU, RAM, disk, IO, ...) in any components?**
15241544
* Failure to create dual-stack services. Operator must perform the following steps:
15251545
1. Ensure that the cluster has `IPv6DualStack` feature enabled.
15261546
2. Ensure that api-server is correctly configured with multi (dual-stack) service
1527-
cidrs using `--services-cluster-ip-range` flag.
1547+
CIDRs using `--services-cluster-ip-range` flag.
15281548
15291549
* Failure to route traffic to pod backing a dual-stack service. Operator must perform the
15301550
following steps:
@@ -1543,6 +1563,22 @@ resource usage (CPU, RAM, disk, IO, ...) in any components?**
15431563
5. If the pod is using host network then operator must ensure that the node is correctly
15441564
reporting dual-stack addresses.
15451565
1566+
* Possible workload imbalances
1567+
1568+
Once a service is saved (with the appropriate feature flag and one or more
1569+
cidrs), the controller manager scans the number of pods (seeing dual or
1570+
single) and creates endpoint objects pointing to these pods.Each node has
1571+
a proxy that watches for services, endpoints, endpoint slices, per family.
1572+
If the existing rules are removed but new ones don't resolve correctly, then
1573+
it will resolve on the next loop.
1574+
1575+
If allocation fails, that would translate to the pod not running if there is
1576+
no IP allocated from the CIDR. If the pod is created but routing is not
1577+
working correctly, there will be an error in the kube-proxy logs, so
1578+
debugging would take place by looking at iptables, similar to how it is
1579+
already done today. The cluster IP allocation is allocated in a syncronous
1580+
process; if this fails the service creation will fail and the service object
1581+
will not be persisted.
1582+
15461583
* **What steps should be taken if SLOs are not being met to determine the problem?**
15471584
N/A
1548-

0 commit comments

Comments
 (0)