@staticmethod
def is_kubeapi_service_ready(ip_or_dns):
    'Validate if kube-api is ready on given address.'
    with contextlib.suppress(ValueError):
        if (ipaddress.ip_address(ip_or_dns).version == 6):
            ip_or_dns = f'[{ip_or_dns}]'
    try:
        response = requests.get(f'https://{ip_or_dns}:6443/readyz', verify=False, timeout=1)
        return response.ok
    except BaseException:
        return False
Validate if kube-api is ready on given address.
@staticmethod
def is_kubeapi_service_ready(ip_or_dns):
    
    with contextlib.suppress(ValueError):
        if (ipaddress.ip_address(ip_or_dns).version == 6):
            ip_or_dns = f'[{ip_or_dns}]'
    try:
        response = requests.get(f'https://{ip_or_dns}:6443/readyz', verify=False, timeout=1)
        return response.ok
    except BaseException:
        return False