Skip to content

Commit df73230

Browse files
author
charlyF
committed
adding details and template for GKE
1 parent ca6f5bc commit df73230

File tree

3 files changed

+14
-19
lines changed

3 files changed

+14
-19
lines changed

02-path-working-with-clusters/201-cluster-monitoring/readme.adoc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,13 @@ As this manifest is a DaemonSet, this deploys a Datadog Agent on all your nodes.
109109
Referring to the https://kubernetes.io/blog/2017/01/running-mongodb-on-kubernetes-with-statefulsets/[Kubernetes Blog] on deploying a MongoDB StatefulSet on Kubernetes:
110110
To set up the MongoDB replica set, you need three things: A StorageClass, a Headless Service, and a StatefulSet.
111111
We start by creating a StorageClass to tell Kubernetes what kind of storage to use for the database nodes.
112-
In this case, we rely on EBS GP2s to store our data.
112+
In this case, we rely on EBS GP2s to store our data (or pd-standard if you are running this in GKE).
113113
114114
```
115115
$ kubectl apply -f templates/mongodb/storageclass.yaml
116116
storageclass.storage.k8s.io "fast" created
117117
```
118+
(use templates/mongodb/storageclass-gcp.yaml if you are on GKE).
118119
119120
Once the storage is ready, we can spin up our MongoDB with 3 replicas.
120121
@@ -125,7 +126,7 @@ statefulset.apps "mongo" created
125126
```
126127
127128
Note that this creates a service which operates as a headless loadbalancer in front of the DBs.
128-
This also generates Persistent Volume Claims, these should appear as EBS volumes in your AWS account.
129+
This also generates Persistent Volume Claims, these should appear as EBS volumes in your AWS account (or pd-standard if you are running this in GKE).
129130
130131
Finally, for the sake of monitoring, we are going to create a user in the Primary Database, which will be used by the Datadog Agent to collect data.
131132
@@ -174,7 +175,7 @@ This web app is an interface to spin up scenarios, where different parts of the
174175
Now is time to see the result of your labor.
175176
176177
Apply the NGINX manifest, this creates a webserver in front of the application as well as a service.
177-
The service, as opposed to the above services is configured to be a LoadBalancer. Therefore, it spins up an AWS ELB and makes a public DNS that is exposed to the world.
178+
The service, as opposed to the above services is configured to be a LoadBalancer. Therefore, it spins up an AWS ELB (or a Load Balancer on GCP) and makes a public DNS that is exposed to the world.
178179
179180
```
180181
$ kubectl apply -f templates/nginx/nginx.yaml
@@ -388,7 +389,7 @@ If you want to remove all the installed components:
388389
kubectl get pvc
389390
kubectl delete pvc-*
390391
391-
Make sure you remove the ELB and the EBSs created.
392+
Make sure you remove the ELB/Load Balancer and the EBSs/pd-standard created.
392393
393394
You are now ready to continue on with the workshop!
394395

02-path-working-with-clusters/201-cluster-monitoring/templates/datadog/agent.yaml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ spec:
3030
value: "true"
3131
- name: DD_PROCESS_AGENT_ENABLED
3232
value: "true"
33-
- name: DD_LOGS_ENABLED
34-
value: "true"
35-
- name: DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL
36-
value: "true"
3733
- name: HOST_PROC
3834
value: /host/proc
3935
- name: HOST_SYS
@@ -47,11 +43,6 @@ spec:
4743
- name: cgroups
4844
mountPath: /host/sys/fs/cgroup
4945
readOnly: true
50-
- name: passwd
51-
mountPath: /etc/passwd
52-
readOnly: true
53-
- name: pointerdir
54-
mountPath: /opt/datadog-agent/run
5546
volumes:
5647
- hostPath:
5748
path: /run/docker.sock
@@ -62,12 +53,6 @@ spec:
6253
- hostPath:
6354
path: /sys/fs/cgroup
6455
name: cgroups
65-
- hostPath:
66-
path: /etc/passwd
67-
name: passwd
68-
- hostPath:
69-
path: /opt/datadog-agent/run
70-
name: pointerdir
7156
---
7257
apiVersion: v1
7358
kind: Service
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
kind: StorageClass
2+
apiVersion: storage.k8s.io/v1
3+
metadata:
4+
name: fast
5+
provisioner: kubernetes.io/gce-pd
6+
parameters:
7+
type: pd-standard
8+
zones: us-central1-a
9+
replication-type: none

0 commit comments

Comments
 (0)