Resetting the IP family policy for application pods and services
The default PreferSingleStack value does not change when you migrate the MicroShift node to dual-stack.
To enable dual-stack networking in application pods and services on a node that uses dual-stack, set the ipFamilyPolicy field to PreferDualStack or RequireDualStack and restart the pods.
-
You used the MicroShift
config.yamlto define a dual-stack network with an IPv6 address family.
-
Set the
spec.ipFamilyPolicyfield to a valid value for dual-stack networking in your service or pod by using the following example:Example dual-stack network configuration for a servicekind: Service apiVersion: v1 metadata: name: microshift-new-service labels: app: microshift-application spec: type: NodePort ipFamilyPolicy: PreferDualStack # ...where:
spec.ipFamilyPolicy-
Required. Specifies the IP family policy for the service. Valid values are
PreferDualStackandRequireDualStack. The value you set depends on the requirements of your application.PreferSingleStackis the default value for theipFamilyPolicyfield.
-
Restart any application pods that do not have a
hostNetworkdefined. Pods that do have ahostNetworkdefined do not need to be restarted to update theipFamilyPolicyvalue.MicroShift system services and pods are automatically updated when the
ipFamilyPolicyvalue is updated.