Skip to main content

Posts

Showing posts with the label role

Openshift/K8S: Permission for access images to your Project/Namespace from another

Openshift and Kubernetes uses images to deploy containers for your projects. If you have a customized image and simply you want to use the same image in your another namespace  or project. In this case you have two options, Either you pull image from image registry that customized image come from or pull it from another project. You may not  use first option if your Kubernetes or Openshift environment is  closed to external or company policies denies it. Second option is a bit of complicated but also  useful too. Also you can scriptize it  for further use. Therefore, it comes! [ozgurkkisa@workstation ~]$ oc policy add-role-to-group \ -n project-common system:image-puller \ system:serviceaccounts:project-new clusterrole.rbac.authorization.k8s.io/system:image-puller added: "system:serviceaccounts:youruser-expose-image"  At the example above, you give image-puller access permission from project named project-common to serviceaccounts in project named project-...