Symptom
After Kubernetes cluster upgraded to version 1.21 and above, when you are fetching the localhost IP addresses, you will obtain both IPv4 and IPv6 address.
For example, when executing the following groovy script via HAC:
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.util.Enumeration;
Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
while (interfaces.hasMoreElements()) {
NetworkInterface network = interfaces.nextElement();
Enumeration<InetAddress> addresses = network.getInetAddresses();
while (addresses.hasMoreElements()) {
InetAddress element = addresses.nextElement();
if ( "localhost" == element.getHostName()){
println element.getHostName() + ":" + element.getHostAddress();
}
}
}
You will see only IPv4 address printed in environment with Kubernetes cluster version lower than 1.21:
localhost:127.0.0.1
And you will see both of the IPv4 and IPv6 addresses printed in nvironment with Kubernetes cluster version 1.21 and above:
localhost:0:0:0:0:0:0:0:1%lo
localhost:127.0.0.1
Read more...
Environment
CCV2
Product
Keywords
KBA , CEC-SCC-CLA-ENV-EMG , Environment Management , CEC-HCS-CCAZ-K8S , Kubernetes infrastructure , Product Enhancement
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.