def run_on_kubernetes(config, namespace='default'):
    'Run dask function inside a pod using the given config.\n\n     Create a pod, using the local kubernetes configuration that starts a Dask Cluster\n     using dask-kubernetes and runs a function specified within the `config` dictionary.\n\n    Args:\n        config (dict):\n            Config dictionary.\n        namespace (str):\n            Kubernetes namespace were the pod will be created.\n    '
    load_kube_config()
    c = Configuration()
    Configuration.set_default(c)
    core_v1 = core_v1_api.CoreV1Api()
    spec = _generate_cluster_spec(config, kubernetes=True)
    core_v1.create_namespaced_pod(body=spec, namespace=namespace)
    print('Pod created.')
Run dask function inside a pod using the given config.

 Create a pod, using the local kubernetes configuration that starts a Dask Cluster
 using dask-kubernetes and runs a function specified within the `config` dictionary.

Args:
    config (dict):
        Config dictionary.
    namespace (str):
        Kubernetes namespace were the pod will be created.
def run_on_kubernetes(config, namespace='default'):
    'Run dask function inside a pod using the given config.\n\n     Create a pod, using the local kubernetes configuration that starts a Dask Cluster\n     using dask-kubernetes and runs a function specified within the `config` dictionary.\n\n    Args:\n        config (dict):\n            Config dictionary.\n        namespace (str):\n            Kubernetes namespace were the pod will be created.\n    '
    load_kube_config()
    c = Configuration()
    Configuration.set_default(c)
    core_v1 = core_v1_api.CoreV1Api()
    spec = _generate_cluster_spec(config, kubernetes=True)
    core_v1.create_namespaced_pod(body=spec, namespace=namespace)
    print('Pod created.')