This message was deleted.
# ask-for-help
s
This message was deleted.
x
First, you should follow the documentation to check if the yatai pod is working properly: https://docs.bentoml.org/projects/yatai/en/latest/installation/yatai.html#verify-the-yatai-installation If it works properly, then check the network of your k8s cluster:
Copy code
kubectl run test-network --rm --tty -i --restart='Never' \
    --namespace default \
    --image curlimages/curl \
    --command -- sh -c 'curl <http://yatai.yatai-system.svc.cluster.local/api/v1/current_org>'
The above command should return:
Copy code
{"message":"username in cookie is empty"}pod "test-network" deleted
gratitude thank you 1
j
Thank you for the quick reply reply! I thought it was an issue caused by changing the namespace of yatai-system. I'll check the network and share it!
When I checked the network, I got the following.
Copy code
 ~/yatai  kubectl run test-network --rm --tty -i --restart='Never' \
    --namespace default \
    --image curlimages/curl \
    --command -- sh -c 'curl <http://yatai.yatai-system.svc.cluster.local/api/v1/current_org>'

curl: (6) Could not resolve host: yatai.yatai-system.svc.cluster.local
pod "test-network" deleted
pod default/test-network terminated (Error)
Copy code
.
It seems that
yatai-system
in the URL means the
yatai-system-namespace
. If I make a request below, you get a normal response.
Copy code
'curl <http://yatai|http://yatai>.<yatai-system-namespace>.svc.cluster.local/api/v1/current_org'
Copy code
kubectl run test-network --rm --tty -i --restart='Never' \
    --namespace default \
    --image curlimages/curl \
    --command -- sh -c 'curl <http://yatai.yatai-system-beta.svc.cluster.local/api/v1/current_org|http://yatai.yatai-system-beta.svc.cluster.local/api/v1/current_org>'
{"message":"username in cookie is empty"}pod "test-network" deleted
Is it impossible to register
yatai-deployment
if I change the namespace of
yatai-system
?
x
you should upgrade yatai-deployment to set the
yatai-system.namespace
to the correct value:
Copy code
helm -n yatai-deployment get values yatai-deployment > yatai-deployment-values.yaml

helm upgrade yatai-deployment bentoml/yatai-deployment -n yatai-deployment --values ./yatai-deployment-values.yaml --set yataiSystem.namespace=yatai-system-beta

kubectl -n yatai-deployment rollout restart deploy/yatai-deployment
j
x
yatai-image-builder also need upgrade
j
The image builder has already changed the yatai-system namespace as below.
Copy code
helm upgrade --install yatai-image-builder yatai-image-builder \
    --set yataiSystem.namespace=$SYSTEM_NAMESPACE \
    --repo <https://bentoml.github.io/helm-charts> \
    -n $IMAGE_BUILDER_NAMESPACE \
    --set dockerRegistry.server=$DOCKER_REGISTRY_SERVER \
    --set dockerRegistry.inClusterServer=$DOCKER_REGISTRY_IN_CLUSTER_SERVER \
    --set dockerRegistry.username=$DOCKER_REGISTRY_USERNAME \
    --set dockerRegistry.password=$DOCKER_REGISTRY_PASSWORD \
    --set dockerRegistry.secure=$DOCKER_REGISTRY_SECURE \
    --set dockerRegistry.bentoRepositoryName=$DOCKER_REGISTRY_BENTO_REPOSITORY_NAME
x
do you restart the yatai-image-builder deployment?
j
yes
x
You should to check these values:
Copy code
helm get values yatai-image-builder -n yatai-image-builder
j
Copy code
yataiSystem:
  namespace: yatai-system-beta
x
Copy code
kubectl -n yatai-system get secret yatai-common-env -o jsonpath='{.data.YATAI_ENDPOINT}' | base64 -d
j
Copy code
 ~/yatai  helm get values yatai-deployment -n $DEPLOYMENT_NAMESPACE
USER-SUPPLIED VALUES:
USER-SUPPLIED VALUES: null
bentoDeploymentNamespaces:
- yatai-beta
layers:
  network:
    ingressClass: alb
yataiServiceAccount:
  namespace: yatai-system-beta
yataiSystem:
  namespace: yatai-system-beta
Copy code
kubectl -n yatai-system get secret yatai-common-env -o jsonpath='{.data.YATAI_ENDPOINT}' | base64 -d
Copy code
 ~/yatai  kubectl -n $SYSTEM_NAMESPACE get secret yatai-common-env -o jsonpath='{.data.YATAI_ENDPOINT}' | base64 -d
<http://yatai.yatai-system.svc.cluster.local>
x
Copy code
kubectl -n yatai-system-beta get secret yatai-common-env -o jsonpath='{.data.YATAI_ENDPOINT}' | base64 -d
j
Copy code
helm upgrade yatai-image-builder bentoml/yatai-image-builder -n $IMAGE_BUILDER_NAMESPACE --values ./yatai-image-builder-values.yaml --set yataiSystem.namespace=$SYSTEM_NAMESPACE --set yatai.endpoint=<http://yatai>.$SYSTEM_NAMESPACE.svc.cluster.local
After applying, the yatai.endpoint has changed. However, it seems that there is a permission problem to get the api token. The error log says " `in the namespace \\\"yatai-system\\\"\"`".
Copy code
1.6763248225944798e+09	ERROR	registerYataiComponent	{"func": "registerYataiComponent", "error": "DoJsonRequest Error: [POST]<http://yatai.yatai-system-beta.svc.cluster.local/api/v1/clusters/default/yatai_components>: POST <http://yatai.yatai-system-beta.svc.cluster.local/api/v1/clusters/default/yatai_components> status=403, {\"message\":\"get api token: failed to get yatai config in cluster default in organization default: secrets \\\"yatai-common-env\\\" is forbidden: User \\\"system:serviceaccount:yatai-system-beta:yatai\\\" cannot get resource \\\"secrets\\\" in API group \\\"\\\" in the namespace \\\"yatai-system\\\"\"}"
x
you should restart yatai-image-builder and yatai-deployment after this upgrade
j
I have already restarted with the command below. Still the same ERROR occurs
Copy code
kubectl -n $DEPLOYMENT_NAMESPACE rollout restart deploy/yatai-deployment
kubectl -n $IMAGE_BUILDER_NAMESPACE rollout restart deploy/yatai-image-builder

kubectl -n $DEPLOYMENT_NAMESPACE logs -f deploy/yatai-deployment
x
first, you should check the secret value:
Copy code
kubectl -n yatai-system-beta get secret yatai-common-env
second, you should set YATAI_SYSTEM_NAMESPACE=yatai-system-beta for
yatai
deployment in
yatai-system-beta
namespace
j
Copy code
$ kubectl -n yatai-system-beta get secret yatai-common-env
NAME               TYPE     DATA   AGE
yatai-common-env   Opaque   2      36h
How to set YATAI_SYSTEM_NAMESPACE=yatai-system-beta for yatai deployment
What value does the secret value check for? There is no YATAI_SYSTEM_NAMESPACE value.
Copy code
kubectl -n yatai-system-beta get secret yatai-common-env
Adding env YATAI_SYSTEM_NAMESPACE to deployment works fine! thank you
👀 1
After restarting deployment, I also restarted image-builder, deployment.