Hi Community, I’m currently studying and testing b...
# ask-for-help
j
Hi Community, I’m currently studying and testing bentoml-yatai on a google vm. My Google environment is as follows: • machine Info: ◦ vCPU: 4 ◦ Memory 8GB • Disk image: Ubuntu 20.04 LTS • DIsk Size: 500GB I installed yatai-deployment components as shown in GitHub. Here’s part of the process I went through: 1.
minikube start --cpus 4 --memory 4096
2.
minikube addons enable ingress
3.
bash <(curl -s "<<https://raw.githubusercontent.com/bentoml/yatai/main/scripts/quick-install-yatai.sh>>")
4.
kubectl --namespace yatai-system port-forward svc/yatai 8080:80 --address='0.0.0.0'
…. 1.
bash <(curl -s "<<https://raw.githubusercontent.com/bentoml/yatai-image-builder/main/scripts/quick-install-yatai-image-builder.sh>>")
2.
bash <(curl -s "<<https://raw.githubusercontent.com/bentoml/yatai-deployment/main/scripts/quick-install-yatai-deployment.sh>>")
→ Testing on a VM, the only thing I changed from the GitHub course was the address value to enter locally. It went fine until bento push and I checked it in yatai ui. However, when I proceeded to step 5 and 6 and installed the deploy component, the deployment tab was not activated. So I found the following error via
kubectl -n yatai-deployment logs -f deploy/yatai-deployment
.
Copy code
W1102 04:22:06.695150       1 reflector.go:424] pkg/mod/k8s.io/client-go@v0.25.0/tools/cache/reflector.go:169: failed to list *v1.Secret: secrets is forbidden: User "system:serviceaccount:yatai-deployment:yatai-deployment" cannot list resource "secrets" in API group "" in the namespace "yatai-system"
E1102 04:22:06.695193       1 reflector.go:140] pkg/mod/k8s.io/client-go@v0.25.0/tools/cache/reflector.go:169: Failed to watch *v1.Secret: failed to list *v1.Secret: secrets is forbidden: User "system:serviceaccount:yatai-deployment:yatai-deployment" cannot list resource "secrets" in API group "" in the namespace "yatai-system
So, I have two questions about the following. I would appreciate your help. 1. Does this error log affect deployment-tab not being enabled? 2. I have specified the cluster role as follows to resolve this error log, but I am getting more error logs. Can you point me to the correct solution? ◦ When I applied the cluster role below, the deployment-tab was enabled again, but more error logs were generated as shown in the attached image.
Copy code
apiVersion: <http://rbac.authorization.k8s.io/v1|rbac.authorization.k8s.io/v1>
kind: ClusterRole
metadata:
    name: yatai-deploy-secret-reader
    namespace: yatai-system
rules:
    - apiGroups: [""]
      resources: ["secrets"]
      verbs: ["get", "watch", "list"]
---
apiVersion: <http://rbac.authorization.k8s.io/v1|rbac.authorization.k8s.io/v1>
kind: ClusterRoleBinding
metadata:
    name: yatai-deploy-serviceaccount-secret-reader
subjects:
    - kind: ServiceAccount
      name: yatai-deployment
      namespace: yatai-deployment
roleRef:
    kind: ClusterRole
    name: yatai-deploy-secret-reader
    apiGroup: <http://rbac.authorization.k8s.io|rbac.authorization.k8s.io>