Not the answer you need?
Register and ask your own question!

MongoDB Operator on minishift

jameskhedleyjameskhedley EntrantCurrent User Role Novice
Hi! Has anyone managed to deploy successfully to minishift recently? I am following the openshift docs but have CreateContainerConfigError on both cluster pods. oc describe pod reports the following:
$ oc describe pod
...
Type     Reason     Age                 From                Message
  ----     ------     ----                ----                -------
  Warning  Failed     1h (x69 over 1h)    kubelet, localhost  Error: container has runAsNonRoot and image has non-numeric user (nobody), cannot verify user is non-root
  Warning  Unhealthy  35m (x96 over 1h)   kubelet, localhost  (combined from similar events): Liveness probe failed: 2020-03-10 10:59:37.196 main.go:70       FATAL  Error connecting to mongodb: no reachable servers
  Normal   Pulled     20m (x242 over 1h)  kubelet, localhost  Successfully pulled image "percona/percona-server-mongodb-operator:1.3.0-backup"
  Normal   Started    10m (x14 over 1h)   kubelet, localhost  Started container
  Warning  BackOff    5m (x92 over 54m)   kubelet, localhost  Back-off restarting failed container
  Normal   Pulling    10s (x329 over 1h)  kubelet, localhost  pulling image "percona/percona-server-mongodb-operator:1.3.0-backup"

So apparently Openshift wants there to be a valid numeric userid, which doesn't seem to be set anywhere on the pod. It was suggested it should be like so:
securityContext:     runAsUser: 999
Openshift won't let me edit the pod definition once deployed and I can't figure out where it would go in the operator. Questions:
  1. Is that likely to be the reason the pod doesn't come up
  2. If so then how do I set it?
$ minishift version
minishift v1.34.2+83ebaab
$ minishift openshift version
openshift v3.11.0+8bff772-387


Thanks!
James

Comments

  • lorraine.pocklingtonlorraine.pocklington Percona Community Manager Legacy User Role Patron
    Hi James Could you tell us what version of minishift you are using please?
  • jameskhedleyjameskhedley Entrant Current User Role Novice
    hi Lorraine, it was in the post but here again
     $ minishift version    minishift v1.34.2+83ebaab    $ minishift openshift version    openshift v3.11.0+8bff772-387
    
  • jameskhedleyjameskhedley Entrant Current User Role Novice
    Hi! Was there anything you could tell me about this, please? We're evaluating this operator to use in a product so it would be nice to know if it is stable/usable or not!
  • MykolaMykola Percona Percona Staff Role

    Hi James

    About your issue with runAsUser, please uncomment platform: openshift line in deploy/cr.yaml file and also make changes which are found in minikube instruction https://www.percona.com/doc/kubernetes-operator-for-psmongodb/minikube.html

    if you are searching for extra stability - we recommend to use fresh OpenShift >=4.2 and using 1.4.0 version of our MongoDB Operator, it supports 4.2 version of MongoDB and will be available very soon.

  • james hedleyjames hedley Current User Role Contributor

    Hi! Thanks. I tried v1.4.0 and can confirm it appears to work out-of-the-box on Minishift (still OpenShift 3.11).

Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.