From e8400b4fe435f84ae89faacfe327bc8143e354a0 Mon Sep 17 00:00:00 2001 From: llhuii Date: Sat, 27 Mar 2021 14:37:06 +0800 Subject: [PATCH] kubectl-create crds instead of kubectl-apply since we switch to pod template which has large crd yaml, this would lead to the error `metadata.annotations: Too long: must have at most 262144 bytes` when `kubectl apply -f` Signed-off-by: llhuii --- docs/setup/install.md | 2 +- hack/local-up.sh | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/setup/install.md b/docs/setup/install.md index 861c5b39..b421a2e5 100644 --- a/docs/setup/install.md +++ b/docs/setup/install.md @@ -34,7 +34,7 @@ git checkout main ```shell # create these crds including dataset, model, joint-inference -kubectl apply -f build/crds/ +kubectl create -f build/crds/ ``` ### Deploy GM diff --git a/hack/local-up.sh b/hack/local-up.sh index c634be5b..561f31f2 100644 --- a/hack/local-up.sh +++ b/hack/local-up.sh @@ -196,13 +196,10 @@ prepare_k8s_env() { export KUBECONFIG=$(realpath $TMP_DIR/kubeconfig) # prepare our k8s environment # create these crds including dataset, model, joint-inference etc. - kubectl apply -f build/crds/ - - # gm, lc will be created in this namespace - kubectl create namespace $NAMESPACE + kubectl create -f build/crds/ # create the cluster role for gm - kubectl apply -f build/gm/rbac/ + kubectl create -f build/gm/rbac/ add_cleanup " kubectl delete -f build/crds/