See the solution below with Step by Step Explanation.
Explanation:
Solution (Step by Step) :
1. Create a Role:
- Create a YAML file named 'scale-app-role.yaml' with the following content:

2. Create a RoleBinding: - Create a YAML file named 'scale-app-rolebinding.yaml' with the following content:

3. Apply the configuration: - Apply the Role and Role8inding using the following commands: bash kubectl apply -f scale-app-role.yaml kubectl apply -f scale-app-rolebinding-yaml 4. Verify the configuration: - You can verify the configuration by using the following command: bash kubectl auth can-i --list --as=user:testuser--group-developers--namespace-dev - Replace 'testuser' with the name of a user in the 'developers' group. The output should show only the following permissions: - 'apps/deployments': 'get, "list, 'watch', 'update', 'patch', 'scale' 5. Test the permissions: - Try to scale the Sapp-deployment deployment using the 'kubectr command as a user in the 'developers group. - Try to perform other actions on the deployment or other resources in the 'devs namespace. You should only be able to scale the Sapp-deployment deployment.