ray/ci/k8s/prep-k8s-environment.sh
Dmitri Gekhtman c4a259828b
[kuberay] Update KubeRay operator commit, turn autoscaler RPC drain back on (#27077)
This PR:

- Updates the KubeRay operator commit used in the Ray CI autoscaling test
- Uses the RayCluster autoscaling sample config from the KubeRay repo in place of of a config from the Ray repo
- Turns the autoscaler RPC worker drain back on, as I saw some dead node messages from the GCS, and the RPC drain is supposed to avoid those.

Signed-off-by: Dmitri Gekhtman <dmitri.m.gekhtman@gmail.com>
2022-07-27 00:00:51 -07:00

37 lines
1 KiB
Bash
Executable file

#!/usr/bin/env bash
# This scripts creates a kind cluster and verify it works
set -xe
# Install kind
wget https://github.com/kubernetes-sigs/kind/releases/download/v0.11.1/kind-linux-amd64
chmod +x kind-linux-amd64
mv ./kind-linux-amd64 /usr/bin/kind
kind --help
# Install kubectl
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl
mv ./kubectl /usr/bin/kubectl
kubectl version --client
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
mv ./kustomize /usr/bin/kustomize
# Delete dangling clusters
kind delete clusters --all
# Create the cluster
time kind create cluster --wait 120s --config ./ci/k8s/kind.config.yaml
docker ps
# Now the kind node is running, it exposes port 6443 in the dind-daemon network.
kubectl config set clusters.kind-kind.server https://docker:6443
# Verify the kubectl works
kubectl version
kubectl cluster-info
kubectl get nodes
kubectl get pods --all-namespaces