4.5. Resetting the IP family policy for application pods and services
The default ipFamilyPolicy configuration value, PreferSingleStack, does not automatically update in all services after you update your MicroShift configuration to dual-stack networking. To enable dual-stack networking in services and application pods, you must update the ipFamilyPolicy value.
Prerequisites
-
You used the MicroShift
config.yamlto define a dual-stack network with an IPv6 address family.
Procedure
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 service
kind: Service apiVersion: v1 metadata: name: microshift-new-service labels: app: microshift-application spec: type: NodePort ipFamilyPolicy: `PreferDualStack`1 # ...- 1
- Required. Valid values for dual-stack networking 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 ipFamilyPolicy value is updated.