Installing a mesh in dual-stack mode
Install Istio with dual-stack networking support to enable both IPv4 and IPv6 connectivity within your service mesh.
Prerequisites
- Kubernetes configured with dual-stack support.
- The Alauda Container Platform Networking for Multus plugin must be installed, and kube-ovn must be v4.1.5 or later.
- You have installed the Alauda Service Mesh v2 Operator on your cluster.
Procedure
Install IstioCNI
Install the IstioCNI resource by running the following command:
Install Istio with dual-stack configuration
-
Create an
Istioresource with dual-stack configuration by running the following command: -
Wait for the control plane to return the
Readystatus condition by running the following command:
Verifying a dual-stack mesh
To confirm that your dual-stack mesh is functioning correctly, you will deploy sample applications with different IP family configurations. The goal is to verify that the mesh can handle IPv4, IPv6, and dual-stack services.
Procedure
Create namespaces for the sample applications
Create the following namespaces, each hosting the tcp-echo service with a specific IP configuration:
-
dual-stack: hosts atcp-echoservice that listens on both IPv4 and IPv6 addresses. -
ipv4: hosts atcp-echoservice listening only on IPv4 addresses. -
ipv6: hosts atcp-echoservice listening only on IPv6 addresses. -
sleep: hosts the client application for sending test requests.
Enable sidecar injection for the namespaces
Label the namespaces to enable automatic Istio sidecar injection by running the following command:
Deploy the sample applications
-
Deploy the
tcp-echoapplication with dual-stack configuration: -
Deploy the
tcp-echoapplication with IPv4-only configuration: -
Deploy the
tcp-echoapplication with IPv6-only configuration: -
Deploy the
sleepapplication, which will act as a client for sending test requests: -
Wait for all deployments to become available:
Verify the dual-stack service configuration
Confirm that the tcp-echo service in the dual-stack namespace is configured with ipFamilyPolicy of RequireDualStack by running the following command:
Example output
Verify connectivity to dual-stack services
Send a test request from the sleep pod to the dual-stack tcp-echo service by running the following command:
Example output
Verify connectivity to IPv4 and IPv6 services
-
Send a test request to the IPv4-only
tcp-echoservice:Example output
-
Send a test request to the IPv6-only
tcp-echoservice:Example output
Removing a dual-stack mesh from a development environment
After completing your verification and experimentation, you should remove the dual-stack configuration to clean up the development environment and release resources.
Procedure
Execute the following commands to remove all Istio components and the sample applications: