Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: policy/v1beta1 PodSecurityPolicy is deprecated in v1.21+, unavailable in v1.25+ #1560

Closed
justsomebody42 opened this issue Apr 20, 2022 · 2 comments · Fixed by #1586

Comments

@justsomebody42
Copy link

PodSecurityPolicy is deprecated and will be removed in v1.25+

Expected Behavior

Compatibility with v1.25+

Current Behavior

Deprecation warning...

Possible Solution

See: https://kubernetes.io/docs/reference/using-api/deprecation-guide/#psp-v125

Steps to Reproduce (for bugs)

:~/.kube$ kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
Warning: policy/v1beta1 PodSecurityPolicy is deprecated in v1.21+, unavailable in v1.25+
podsecuritypolicy.policy/psp.flannel.unprivileged configured
clusterrole.rbac.authorization.k8s.io/flannel unchanged
clusterrolebinding.rbac.authorization.k8s.io/flannel unchanged
serviceaccount/flannel unchanged
configmap/kube-flannel-cfg unchanged
daemonset.apps/kube-flannel-ds configured

Your Environment

  • Flannel version: v0.17.0
  • Etcd version: 3.5.1-0
  • Kubernetes version (if used): v1.23.5
  • Operating System and version: Ubuntu 21.10 / 20.04.4 LTS
@manuelbuil
Copy link
Collaborator

Will #1559 fix it?

@thomasferrandiz
Copy link
Contributor

Starting from Kubernetes 1.21, PodSecurityPolicy has been deprecated and will disappear in 1.25.
It should be replaced by the Pod Security admission controller which is in beta starting in 1.23: https://kubernetes.io/blog/2021/12/09/pod-security-admission-beta/

So I think the way to solve this would be to add a second manifest that uses Pod Security instead of PodSecurityPolicy.

#1559 will not solve the issue since the PodSecurityPolicy is not graduating from beta to stable but will be removed completely.

@thomasferrandiz thomasferrandiz linked a pull request Jun 15, 2022 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants