--- apiVersion: v1 kind: Namespace metadata: name: ingress-nginx labels: app.kubernetes.io/name: ingress-nginx app.kubernetes.io/instance: ingress-nginx --- apiVersion: security.openshift.io/v1 kind: SecurityContextConstraints metadata: annotations: kubernetes.io/description: nginx provides all features of the restricted SCC but allows users to run with any non-root UID and adds the NET_BIND_SERVICE capability. The user must specify the UID or it must be specified on the manifest of the container runtime. name: nginx allowHostDirVolumePlugin: false allowHostIPC: false allowHostNetwork: true allowHostPID: false allowHostPorts: false allowPrivilegeEscalation: true allowPrivilegedContainer: false allowedCapabilities: - NET_BIND_SERVICE defaultAddCapabilities: null fsGroup: type: RunAsAny groups: [] priority: null readOnlyRootFilesystem: false requiredDropCapabilities: - KILL - MKNOD - SETUID - SETGID runAsUser: type: MustRunAsNonRoot seLinuxContext: type: MustRunAs supplementalGroups: type: RunAsAny users: [] volumes: - configMap - downwardAPI - emptyDir - persistentVolumeClaim - projected - secret --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: ingress-nginx-scc namespace: ingress-nginx rules: - apiGroups: - security.openshift.io resourceNames: - nginx resources: - securitycontextconstraints verbs: - use --- kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: ingress-nginx-scc namespace: ingress-nginx subjects: - kind: ServiceAccount name: ingress-nginx namespace: ingress-nginx - kind: ServiceAccount name: ingress-nginx-admission namespace: ingress-nginx roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: ingress-nginx-scc