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

Exceeding Object Quotas

In this section we will demonstrate that object quotas cannot be exceeded; instead, the resource object that

would exceed the hard limit is not created. First, create an RC definition file mysql-rc.yaml.

---

apiVersion: v1

kind: ReplicationController

metadata:

name: mysql-rc

labels:

app: mysql-app

spec:

replicas: 3

selector:

app: mysql-app

deployment: v1

template:

metadata:

labels:

app: mysql-app

deployment: v1

spec:

containers:

-

env:

-

name: MYSQL_ROOT_PASSWORD

value: mysql

image: mysql

name: mysql

ports:

-

containerPort: 3306

resources:

requests:

memory: "64Mi"

cpu: "0.1"

limits:

memory: "128Mi"

cpu: "0.2"

290

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

Saved successfully!

Ooh no, something went wrong!