forked from pivotal-cf/docs-pks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustom-workloads.html.md.erb
38 lines (32 loc) · 1.08 KB
/
custom-workloads.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
title: Add Custom Workloads
owner: PKS
---
<strong><%= modified_date %></strong>
To apply custom Kubernetes workloads to every cluster created on a plan, add a YAML file to the tile config under **Default Cluster Apps**.
Custom workloads define what a cluster includes out of the box.
For example, you can use custom workloads to configure metrics or logging.
The following example YAML file comes from the [Kubernetes documentation](https://github.com/kubernetes):
<pre class="terminal">
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 2 # tells deployment to run 2 pods matching the template
template: # create pods using pod definition in this template
metadata:
# unlike pod-nginx.yaml, the name is not included in the meta data as a unique name is
# generated from the deployment name
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
</pre>