From 31453621ef0870b1ad4c56b7fab580028ba20e5e Mon Sep 17 00:00:00 2001 From: Dmitri Gekhtman <62982571+DmitriGekhtman@users.noreply.github.com> Date: Mon, 4 Jan 2021 08:29:17 -0800 Subject: [PATCH] [kubernetes][docs][minor] Kubernetes version warning (#13161) --- doc/source/cluster/k8s-operator.rst | 4 ++++ python/ray/operator/operator.py | 20 -------------------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/doc/source/cluster/k8s-operator.rst b/doc/source/cluster/k8s-operator.rst index d17443e55..f993e4f26 100644 --- a/doc/source/cluster/k8s-operator.rst +++ b/doc/source/cluster/k8s-operator.rst @@ -19,6 +19,10 @@ The rest of this document explains step-by-step how to use the Ray Kubernetes Op .. role:: bash(code) :language: bash +.. warning:: + The Ray Kubernetes Operator requires Kubernetes version at least ``v1.17.0``. Check Kubernetes version info with the command + :bash:`kubectl version`. + .. note:: The example commands in this document launch six Kubernetes pods, using a total of 6 CPU and 3.5Gi memory. If you are experimenting using a test Kubernetes environment such as `minikube`_, make sure to provision sufficient resources, e.g. diff --git a/python/ray/operator/operator.py b/python/ray/operator/operator.py index 9771810c1..cf83eaa24 100644 --- a/python/ray/operator/operator.py +++ b/python/ray/operator/operator.py @@ -1,23 +1,3 @@ -""" -Ray operator for Kubernetes. - -Reads ray cluster config from a k8s ConfigMap, starts a ray head node pod using -create_or_update_cluster(), then runs an autoscaling loop in the operator pod -executing this script. Writes autoscaling logs to the directory -/root/ray-operator-logs. - -In this setup, the ray head node does not run an autoscaler. It is important -NOT to supply an --autoscaling-config argument to head node's ray start command -in the cluster config when using this operator. - -To run, first create a ConfigMap named ray-operator-configmap from a ray -cluster config. Then apply the manifest at python/ray/autoscaler/kubernetes/operator_configs/operator_config.yaml - -For example: -kubectl create namespace raytest -kubectl -n raytest create configmap ray-operator-configmap --from-file=python/ray/autoscaler/kubernetes/operator_configs/test_cluster_config.yaml -kubectl -n raytest apply -f python/ray/autoscaler/kubernetes/operator_configs/operator_config.yaml -""" # noqa import logging import multiprocessing as mp import os