Skip to content

Use

At this point, the developer is ready to request a cluster within the shared host Kubernetes cluster. To get access to the environment, note that the developer

  • Does not need to have any knowledge of Terraform or other IaC frameworks
  • Does not need access to privileged credentials for the host cluster
  • Does not need any help from the Platform team to deploy their environment

Important

Ensure that the developer is assigned to a group that has the "Environment Template User role" in the project. This will provide the developer the ability to create the new cluster based environment via self-service.


Request Cluster

When a developer requests a cluster, a series of steps are automatically performed to fulfil the request. The sequence diagram below describes the high level steps.

Important

Although the recommended workflow assumes and recommends using an Integration with an Identity Provider (IdP) to provide a Single Sign On (SSO) experience, organizations can also use locally managed users.

sequenceDiagram    
    participant dev as Developer
    participant rafay as Rafay Platform
    participant csp as Host Cluster
    participant idp as Identity Provider 

    dev->>rafay: Login (Opt. SSO)
    dev->>rafay: New Environment 
    rect rgba(0, 0, 255, .1)
    rafay-->>csp: Create vCluster 
    opt SSO via Identity Provider
        rafay-->>idp: Create Group for k8s cluster 
        rafay-->>idp: Add developer to Group 
    end
    rafay->>rafay: Create Group in Rafay
    rafay->>rafay: Add Project Admin <br>RBAC to Group
    end
    dev-->>app: Developer uses Cluster

Note

Once the developer logs into the Rafay Org after the the environment is created (SSO using Identity Provider recommended), they will automatically have access to their specific cluster they have been authorized to use. The necessary RBAC to the assigned Kubernetes namespace is orchestrated automatically by Rafay Kubernetes Manager.


Step 1: Configure Environment

In this step, a developer will configure their "Kubernetes vCluster" based environment using the provided environment template. Once the vCluster is created on the host Kubernetes cluster, the developer will be automatically provided access to the vCluster with a role with which they can administer the cluster.

  • Log into the controller and select your project
  • Navigate to Environments -> Environments
  • Click New Environment
  • Enter vcluster-1 for the name
  • Select the existing vcluster environment template
  • Select the environment template version
  • Click Create
  • Click Save

Step 2: Deploy Environment

The developer can now deploy the environment. Environment Manager will automatically create a vCluster on the shared host cluster, configure the vCluster project with the specified policies and assign the proper RBAC to allow the developer with the privileges to manage resources in the newly created vCluster.

  • Developer logs in and navigates to the project
  • Navigate to Environments -> Environments
  • Click on the vcluster-1 environment
  • Click Deploy

The environment will begin to deploy. This step can take ~5 minutes to complete.


Step 3: Use vCluster

Once the environment has finished deploying, the developer can use the newly deployed vCluster. They can deploy and operate containerized applications to the newly created cluster. The typical steps are as follows

  • Build a container image
  • Upload the container image to a container registry (e.g. ECR or DockerHub)
  • Create Kubernetes YAML for the container image
  • Deploy the application to the cluster using either Kubectl or Helm or Rafay workloads.

Access vCluster

Developers can optionally use the steps below to access the vCluster that is created for them.

  • Log into the controller
  • Search for project vcluster-1 (A project with the same name as the environment resource name is created for the vCluster)
  • Click the vcluster-1 project name
  • Navigate to Infrastructure -> Clusters

You will see the provisioned vCluster available for use.

vCluster


Summary

In summary, with Rafay, developers can now develop, deploy and validate their applications on vClusters within a shared host that was provisioned for them in a "self-service" manner.