the server could not find the requested resource (get vulnerabilityreports.aquasecurity.github.io)" error #221
-
Hi, I tried to run "starboard find vulnerabilities ..." on my k8s deployments but got "the server could not find the requested resource (get vulnerabilityreports.aquasecurity.github.io)" error. However if I ran "kubectl get vulnerabilities --selector starboard.resource.kind=Deployment,starboard.resource.name ..." I could see the output. Could anyone please tell me what I might have missed? Any help would be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
👋 @ouyangck I assume that you'd run starboard init command and its exit code was 0. Could you confirm that the vulnerabilityreports.aquasecurity.github.io CRD was accepted by the Kubernetes API. You can do that with the following command and make sure that the
Could you also provide the full command that you used to find vulnerabilities, including all flags and args that you specified? I'm also wondering which version of K8S are you using and whether it's a local cluster or a managed distribution? |
Beta Was this translation helpful? Give feedback.
-
Thank you, Daniel, for looking into this. I did not get error when I ran starboard init. Here is what I got when I ran your "kubectl describe crd..." command: The command i used to find vulnerabilities: starboard find vulnerabilities deployment/nginx Not sure if this is what you were looking for, I ran kubectl version --client and here is what I got: Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T12:50:19Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"linux/amd64"} Thank you so much! |
Beta Was this translation helpful? Give feedback.
-
Thank you, Daniel, I ran the command and got the following: NAME SHORTNAMES APIGROUP NAMESPACED KIND The name for vulnerability report I got is "vulnerabilities", not "vulnerability reports", but I am not sure why I got this. So i got the vulnerabilityreports.crd.yaml from github and did a kubectl apply -f vulnerabilityreports.crd.yaml. Finally I can see "vulnerabilityreports" after running the command: NAME SHORTNAMES APIGROUP NAMESPACED KIND Again, I am not sure why. Maybe the binary file I got is not updated? Here is the file I pulled: https://github.com/aquasecurity/starboard/releases/download/v0.4.0/starboard_linux_x86_64.tar.gz I will keep looking. But thanks again for your help! |
Beta Was this translation helpful? Give feedback.
-
For the sake of consistency, we've renamed the CRD from |
Beta Was this translation helpful? Give feedback.
-
@ouyangck Please file an issue is you still have this problem with the most recent release of Starboard. Please provide version / distribution of Kubernetes instance and all steps that you followed so in case of problem we could reproduce what you did. |
Beta Was this translation helpful? Give feedback.
@ouyangck Please file an issue is you still have this problem with the most recent release of Starboard. Please provide version / distribution of Kubernetes instance and all steps that you followed so in case of problem we could reproduce what you did.