Dev Workflows Flashcards

1
Q

What are Dev Clusters?

A

Even though many clusters are designed to run production
applications and thus are rarely accessed by developer workflows, it is also critical to enable development workflows to target Kubernetes, and this typically means having a cluster or at least part of a cluster that is intended for development.

Setting up such a cluster to facilitate easy development of applications for Kubernetes is a critical part of ensuring success with Kubernetes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the goals of a dev cluster?

A
  • Fast onboarding of new memebers
  • Ease of developing new features
  • Simple testing in a cluster similar to prod
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are considerations of setting up one cluster for all Dev or one cluster per developer?

A

The second approach is only feasible in a cloud environment where spinning up new clusters is easy.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

If you create on cluster for all developers, how do you handle scope?

A

With namespaces.

Namespaces can serve as scopes for the deployment of services so that one user’s frontend service doesn’t interfere with another user’s frontend service. Namespaces are also scopes
for RBAC, ensuring that one developer cannot accidentally delete another developer’s work. Thus, in a shared cluster it makes sense to use a namespace as a developer’s workspace.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How can you handle Resource usage in a shared cluster?

A

If you want to limit the amount of resources consumed by a particular namespace, you can use the ResourceQuota resource to set a limit to the total number of resources that any particular namespace consumes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How does a “ResourceQuota” look like?

A

apiVersion: v1
kind: ResourceQuota
metadata:
name: limit-compute
namespace: my-namespace
spec:
hard:
requests.cpu: “10”
requests.memory: 100Gi
imits.cpu: “10”
limits.memory: 100Gi

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a convention for setting up and updating cluster easily as a developer?

A

Have scripts which handle all of it:

  • setup.sh for setting up a cluster
  • deploy.sh to deploy components
How well did you know this?
1
Not at all
2
3
4
5
Perfectly