19.06.2021 Views

148422597X Kubernetes Management Design Patterns [Vohra 2017-01-29] {E559F6BB}

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 12 ■ Using Resource Quotas

deployment: v1

spec:

containers:

-

env:

-

name: MYSQL_ROOT_PASSWORD

value: mysql

image: mysql

name: mysql

ports:

-

containerPort: 3306

resources:

requests:

memory: "640Mi"

cpu: "500m"

limits:

memory: "1280Mi"

cpu: "2"

Create a replication controller with 10 replicas:

./kubectl scale rc mysql-rc --replicas=10

Next, describe the compute-resource-quotas. The Used column lists the actual used resources. None of

the used resources exceed the hard limits, as shown in Figure 12-8.

Figure 12-8. Used resources do not exceed the hard limits

285

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!