async def refresh_token(loader, client_configuration=None, interval=60):
    """Refresh token if necessary, updates the token in client configurarion

    :param loader: KubeConfigLoader returned by load_kube_config
    :param client_configuration: The kubernetes.client.Configuration to
            set configs to.
    :param interval: how often check if token is up-to-date

    """
    if loader.provider != 'gcp':
        return

    if client_configuration is None:
        client_configuration = Configuration()

    while 1:
        await asyncio.sleep(interval)
        await loader.load_gcp_token()
        client_configuration.api_key['authorization'] = loader.token