Create Users, a Workspace and Projects in KubeSphere

In this blog, we will create users, a workspace and projects in KubeSphere.

The multi-tenant system of KubeSphere features 3 levels of hierarchical structure which are cluster, workspace, and project. A project in KubeSphere is a Kubernetes namespace.

Prerequisites:

  1. You have Civo account.
  2. KubeSphere is configured on Civo as per my first and second blogs in this series.

How to Create Users?

  1. Login to KubeSphere with your admin user's credentials.
  2. You can see dashboard of KubeSphere. Click on Platform button. 1.jpeg
  3. Click on Access Control section. 2.jpeg
  4. Click on Users tab. 3.jpeg
  5. Click on Create button. A new user dialog will open. Fill it as given below: 4.jpeg
  6. Click OK button. You will see a newly created user in user list. Click on admin dropdown and select Log Out option to logout admin user. 5.jpeg
  7. Login with your new user's credentials.
  8. Repeat step-5 to create ws-manager, ws-admin, project-admin, project-regular users: 6.jpeg 7.jpeg 8.jpeg 9.jpeg
  9. You will see all created users in user list page. 10.jpeg
  10. Follow step-6 to logout current user.

How to Create a Workspace?

  1. Login to KubeSphere with ws-manager user's credentials.
  2. Click on Create button in Workspaces tab. Fill a new workspace form as given below: 11.jpeg
  3. Click on Create button. You will see workspace list with a newly created workspace. 12.jpeg
  4. Logout current user and login with ws-admin user's credentials.
  5. You will see overview of demo-workspace. 13.jpeg
  6. Click on Workspace Settings dropdown and Workspace Members option. You will see workspace memeber list. 14.jpeg
  7. Click on Invite button. You will see dialog. Click on + (plus) button for project-admin and select demo-workspace-self-provisioner option. Click on + (plus) button for project-regular and select demo-workspace-viewer option. 15.jpeg
  8. Click on OK button. You will see workspace member list with new 2 members. 16.jpeg
  9. Logout current user.

How to Create a Project?

  1. Login to KubeSphere with project-admin user's credentials.
  2. You will see workspace that assigned to logged-in user. Click on Create button of Projects tab. 17.jpeg
  3. You will see a new project dialog. Fill it as given below: 18.jpeg
  4. Click on OK button. You will see project list with a newly created project. 19.jpeg
  5. Click on project name (in my case demo-project). You will see overview of project. 20.jpeg
  6. Click on Edit Quotas button of Project Quotas section. You will see dialog. Change it as per your requirement. I changed it to 4 CPU core and 8 Gi memory. 21.jpeg
  7. Click on OK button. Click on Project Settings dropdown and select Basic Information option. You can verify configured project quotas in this page. 22.jpeg
  8. Click on Project Members option under Project Settings dropdown. You will see project member list. Click on Invite button. You will see dialog. Click on + (plus) button for project-regular member and select operator as a user role. 23.jpeg
  9. Click on OK button. You will see project member list. 24.jpeg
  10. Click on Gateway Settings option under Project Settings dropdown. You will see project gateway page as given below: 25.jpeg
  11. Click on Enable Gateway button. You will see dialog. 26.jpeg
  12. Make sure NodePort selected as Access Mode. Click on OK button. You will see gateway settings page. 27.jpeg
  13. Logout current user.

How to Create DevOps Project?

  1. Login to KubeSphere with project-admin user's credentials.
  2. Click on DevOps Projects tab. You will see initial page. 28.jpeg
  3. Click on Create button. You will see a new DevOps project creation dialog. Fill it as given below: 29.jpeg
  4. Click on OK button. You will see a newly created DevOps project. 30.jpeg
  5. Click on project name (in my case demo-devops). You will see detail page of it. Click on DevOps Project Members option under DevOps Project Settings. You will see DevOps project member list. 31.jpeg
  6. Click on Invite button. You will see dialog. Click on + (plus) button for project-regular and select operator as a user role. 32.jpeg
  7. Click on OK button. You will DevOps project member list. 33.jpeg
  8. Logout current user.

Congratulations! We successfully created users, a workspace and projects in KubeSphere.