I am testing my binary authorization policies and put an exemption entry to allow nginx
.
Following are the entries I tried by adding them under Images exempt from policy
registry.hub.docker.com/library/nginx*
registry.hub.docker.com/library/nginx.latest
docker.io/library/nginx*
but it is failing with below error
$ kubectl run httpd-server --image=nginx --restart=Never -l app=httpd-server --port 80
Error from server (VIOLATES_POLICY): admission webhook "imagepolicywebhook.image-policy.k8s.io" denied the request: Image nginx denied by Binary Authorization default admission rule. Denied by always_deny admission rule
If i disable binary authorization and install the nginx package , it shows the following repository is used to pull the image
image: docker.io/library/nginx:latest
This entry is already there in Images exempt from policy , but the download is still blocked . Sharing the policy definition as requested .
Any suggestions ?