Container: Project Administration

Overview

OpenShift Project Administration Documentation

Adding Users To A Project

Additional users can be added to a project via the User Interface (UI).

  1. Within the project, navigate to the Resources menu in the left-hand navigation and select Membership.
  2. Click Edit Membership in the upper right-hand corner of the window.
  3. Add the user via their uniqname. The minimal role they will need to access the project is View.

Access Project Services Based On Labels

$ oc describe service os-docker-build

  • Name: os-docker-build
  • Namespace: dnowell
  • Labels: app=os-docker-build
  • Selector: app=os-docker-build,deploymentconfig=os-docker-build
  • Type: ClusterIP
  • IP: 172.30.72.129
  • Port: 80-tcp 80/TCP
  • Endpoints: <none>
  • Port: 443-tcp 443/TCP
  • Endpoints: <none>
  • Session Affinity: None
  • No events.

Delete Artifacts From a Project Based On Labels

Artifacts will occasionally build up within your project. Labels are useful here, because they allow you to delete all artifacts that have a certain label without deleting anything that doesn't have that label. To see what labels are affixed to a particular artifact, use the describe command:

$ oc describe rc/sampleapplication
...
Labels: app=somelabel

You can then delete all artifacts with that label--in this case builds--by running the following command:

$ oc delete builds -l app=somelabel
build "sampleapplication-1" deleted
build "sampleapplication-2" deleted

To delete everything with that label, run the following command.

WarningThis will delete all pods, services and deployment configurations. Do not do this in a running production application!

$ oc delete all -l app=somelabel
buildconfig "sampleapplication" deleted
build "sampleapplication-1" deleted
build "sampleapplication-2" deleted
imagestream "sampleapplication" deleted
deploymentconfig "sampleapplication" deleted
service "sampleapplication" deleted

Last Updated: 
Monday, September 10, 2018