Skip to content

Error creating: pods "nginxingress-sample-nginx-ingress-controller" is forbidden: unable to validate against any security context constraint #116

@andresm53

Description

@andresm53

Describe the bug
Environment: Openshift 4.12.14. I installed the Operator from "Operators Hub", and then applied the SCC, and then created an ingress controller as per https://github.com/nginxinc/nginx-ingress-helm-operator#getting-started. However, the ingress pods won't start and I see this error in the replicas log:

Error creating: pods "nginxingress-sample-nginx-ingress-controller-7d69d8bb5-" is forbidden: unable to validate against any security context constraint: [provider "anyuid": Forbidden: not usable by user or serviceaccount, spec.containers[0].securityContext.capabilities.add: Invalid value: "NET_BIND_SERVICE": capability may not be added, spec.containers[0].securityContext.runAsUser: Invalid value: 101: must be in the ranges: [1001010000, 1001019999], provider "restricted": Forbidden: not usable by user or serviceaccount, provider "nonroot-v2": Forbidden: not usable by user or serviceaccount, provider "nonroot": Forbidden: not usable by user or serviceaccount, provider "pcap-dedicated-admins": Forbidden: not usable by user or serviceaccount, provider "hostmount-anyuid": Forbidden: not usable by user or serviceaccount, provider "machine-api-termination-handler": Forbidden: not usable by user or serviceaccount, provider "hostnetwork-v2": Forbidden: not usable by user or serviceaccount, provider "hostnetwork": Forbidden: not usable by user or serviceaccount, provider "hostaccess": Forbidden: not usable by user or serviceaccount, provider "splunkforwarder": Forbidden: not usable by user or serviceaccount, provider "node-exporter": Forbidden: not usable by user or serviceaccount, provider "privileged": Forbidden: not usable by user or serviceaccount]

To Reproduce
Steps to reproduce the behavior:

  1. Deploy Nginx Ingress Operator from Openshift's Operators Hub.
  2. Apply SCC as per point number 3 in https://github.com/nginxinc/nginx-ingress-helm-operator#getting-started
  3. Create an ingress controller following this example https://github.com/nginxinc/nginx-ingress-helm-operator/blob/main/config/samples/charts_v1alpha1_nginxingress.yaml
  4. See error above in the replicas logs.

Expected behavior
Ingress contoller pods running sucessfully.

Your environment

  • Version of the NGINX Ingress Operator: 1.4.2
  • Version of the Ingress Controller: 1.4.2
  • Version of Kubernetes: Openshift 4.12.14
  • Kubernetes platform (e.g. Mini-kube or GCP)
  • Using NGINX or NGINX Plus: Nginx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions