Skip to content

Group Management

groups

Objective

Learn how to create groups, add users to these groups, and assign permissions efficiently.You will be equipped to organize and manage groups effectively, ensuring streamlined user management and enhanced collaboration within your OpenShift environment.

Prerequisites

  • Access to an OpenShift cluster or a terminal emulator connected to one.
  • Understanding of Kubernetes RBAC (Role-Based Access Control) and group management.
  • Basic knowledge of YAML syntax for creating and editing configuration files.

Introduction

In the kingdom of OpenShift, just as in any well-organized castle, managing groups of people efficiently is key to maintaining order and productivity. Groups in OpenShift represent sets of users, allowing for streamlined management and permission assignment. The cluster administrator, akin to the castle's steward, has the authority to create new groups, add users to them, and assign necessary permissions.

This guide will walk you through the essentials of group management in OpenShift, ensuring your digital realm runs as smoothly as a well-ordered medieval court.

Group Management

Groups in OpenShift serve as a means to collectively manage users, assign roles, and streamline permissions. Let's explore how to create and manage these groups, much like organizing the various guilds and factions within the castle walls.

Creating a New Group

Creating a new group in OpenShift is akin to establishing a new guild in the castle. This guild, or group, can then be populated with members (users) who share common responsibilities or roles.

To create a new group, use the following command:

oc adm groups new lead-developers

In the castle, this is like forming the guild of lead developers, a group of master craftsmen and engineers responsible for the most critical and innovative projects in the realm.

Adding Users to a Group

Once a group (or guild) is created, the next step is to add members to it. This is similar to enrolling skilled artisans into the guild, ensuring that all members can collaborate and share resources efficiently.

To add a user to a group, use the following command:

oc adm groups add-users lead-developers user1

Here, user1 is now a proud member of the lead-developers guild, ready to contribute their expertise to the kingdom’s most important projects.

Example Scenario

Imagine you are the steward of the castle, tasked with overseeing a major project to construct a new tower. You decide to form a group of your best engineers and builders to manage this project efficiently.

First, you create a group for the lead developers:

oc adm groups new lead-developers

Next, you add your top engineers to this group:

oc adm groups add-users lead-developers user1
oc adm groups add-users lead-developers user2
oc adm groups add-users lead-developers user3

With these commands, user1, user2, and user3 are now part of the lead-developers group, ready to collaborate on the tower construction.

Assigning Permissions to Groups

To ensure that the group has the necessary permissions to carry out their tasks, you can assign roles to the entire group. This is similar to granting the guild of lead developers access to the royal armory, tools, and resources needed for their work.

For example, to grant the edit role to the lead-developers group:

oc policy add-role-to-group edit lead-developers -n my-project

With this command, the lead-developers group is now empowered with the edit role within the specified project, allowing them to make necessary changes and updates.

Conclusion

Managing groups in OpenShift is crucial for maintaining order and efficiency within your digital kingdom. By creating and managing groups, adding users, and assigning permissions, you can ensure that your teams work collaboratively and effectively.

As the steward of this modern castle, your ability to organize and manage groups will lead to a more productive and harmonious realm, where every user and group can contribute to the kingdom’s success. May your administration be wise and your projects flourish!