Closed philicious closed 6 years ago
btw I'm seeing a somewhat similar error with weave-scope
kubectl apply --namespace kube-system -f "https://cloud.weave.works/k8s/scope.yaml?k8s-version=$(kubectl version | base64 | tr -d '\n')"
serviceaccount "weave-scope" configured
clusterrolebinding "weave-scope" configured
deployment "weave-scope-app" configured
service "weave-scope-app" configured
daemonset "weave-scope-agent" configured
Error from server (Forbidden): clusterroles.rbac.authorization.k8s.io "weave-scope" is forbidden: attempt to grant extra privileges: [PolicyRule{Resources:["*"], APIGroups:["*"], Verbs:["*"]} PolicyRule{NonResourceURLs:["*"], Verbs:["*"]}] user=&{ops@moqops.com [system:authenticated] map[]} ownerrules=[PolicyRule{Resources:["selfsubjectaccessreviews"], APIGroups:["authorization.k8s.io"], Verbs:["create"]} PolicyRule{NonResourceURLs:["/api" "/api/*" "/apis" "/apis/*" "/healthz" "/swaggerapi" "/swaggerapi/*" "/version"], Verbs:["get"]}] ruleResolutionErrors=[]
however weave-scope seems to work. i.e. I can open the dashboard and it shows my pods, containers, process etc
@philicious are you running kubelet
configured to call CNI? That 10.4.1.0/24
range is nothing to do with Weave Net, would be consistent with kubelet using non-CNI networking.
The rbac error is a bit cryptic, but I think it means the user you are calling kubectl
as does not have the required permissions.
How is your Kubernetes installed? E.g from kubeadm
or from instructions found somewhere?
@bboreham its GKE and its installed as simple as
gcloud container clusters create production --zone europe-west1-d --machine-type n1-standard-2 --num-nodes 3 --cluster-version 1.7.2
the rbac error also surprised as the user I'm using is the owner of the GCP project. so it has all possible rights.
@bboreham ye so the reason for the CNI plugin not being picked up is that --network-plugin
is an k8s alpha feature as I just noticed and that cluster doesnt have alpha enabled. thx for the hint.
so whats left from this issue is the rbac errors. as weave-net wont work for me in this scenario, we could also close this issue if you are not "interested" in the rbac errors ?
I don't know much about GKE but I see lots of versions of the same answer, e.g. https://www.weave.works/docs/tutorials/kubernetes/cloud-on-gke/ https://coreos.com/operators/prometheus/docs/latest/troubleshooting.html
Can I ask what you were looking to get from Weave Net, since GKE already provides a container network managed by Google? (There are lots of valid answers, just interested to know which one(s) apply here)
I was hoping to get support for Multicast. The project I'm currently working for uses vert.x microservices framework which uses e.g. multicast for discovery. the devs are struggling getting the discovery methods designed for running on k8s to work. so I was evaluating a more platform-side solution to this problem
@bboreham I can confirm that running
kubectl create clusterrolebinding myname-cluster-admin-binding --clusterrole=cluster-admin --user=myname@example.org
prior to running the weave-scope or weave-net install scripts, fixes the rbac error. i.e. its not happening.
so maybe the install doc needs to be updated with that precious info
btw I never saw that page you linked https://www.weave.works/docs/tutorials/kubernetes/cloud-on-gke/ and only the docs from here https://www.weave.works/docs/net/latest/kubernetes/kube-addon/ as I havent used weave cloud before but only the community stuff.
otherwise I would have found that command myself I guess :P
This is documented as prerequisite in https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control
You must grant your user the ability to create roles in Kubernetes by running the following command. [USER_ACCOUNT] is the user's email address:
kubectl create clusterrolebinding cluster-admin-binding \
--clusterrole cluster-admin --user [USER_ACCOUNT]
Necessary documentation is added in #3412
What you expected to happen?
Installation works and weave-net available
What happened?
Seeing errors when installing and weave-net route/eth missing in pods.
Anything else we need to know?
Versions:
Logs:
Network:
in the pods, I see the weave-net route missing
Extra info
excerpt of kubectl describe nodes
My best guess would be that these are problematic