From 1f7f9aa0e699027b73143e7e3c51a1adc24ae733 Mon Sep 17 00:00:00 2001 From: chaowang95 Date: Thu, 3 Aug 2017 01:31:32 +0800 Subject: [PATCH 1/2] Add an yaml example in Writing a DaemonSet Spec (#4553) * Add yaml example in DeamonSet doc * Update daemonset.md * use code include instead of duplicate in md * remove redundant download link --- .../workloads/controllers/daemonset.md | 11 ++++++ .../workloads/controllers/deamonset.yaml | 36 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 docs/concepts/workloads/controllers/deamonset.yaml diff --git a/docs/concepts/workloads/controllers/daemonset.md b/docs/concepts/workloads/controllers/daemonset.md index 06d4227940..a68beb3046 100644 --- a/docs/concepts/workloads/controllers/daemonset.md +++ b/docs/concepts/workloads/controllers/daemonset.md @@ -26,6 +26,17 @@ different flags and/or different memory and cpu requests for different hardware ## Writing a DaemonSet Spec +### Create a DeamonSet + +You can describe a DeamonSet in a YAML file. For example, the deamonset.yaml file below describes a DeamonSet that runs the fluentd-elasticsearch Docker image: + +{% include code.html language="yaml" file="deamonset.yaml" ghlink="/docs/concepts/workloads/controllers/deamonset.yaml" %} + +* Create a DeamonSet based on the YAML file: +``` +kubectl create -f deamonset.yaml +``` + ### Required Fields As with all other Kubernetes config, a DaemonSet needs `apiVersion`, `kind`, and `metadata` fields. For diff --git a/docs/concepts/workloads/controllers/deamonset.yaml b/docs/concepts/workloads/controllers/deamonset.yaml new file mode 100644 index 0000000000..e01d14d800 --- /dev/null +++ b/docs/concepts/workloads/controllers/deamonset.yaml @@ -0,0 +1,36 @@ +apiVersion: extensions/v1beta1 +kind: DaemonSet +metadata: + name: fluentd-elasticsearch + namespace: kube-system + labels: + k8s-app: fluentd-logging +spec: + template: + metadata: + labels: + name: fluentd-elasticsearch + spec: + containers: + - name: fluentd-elasticsearch + image: gcr.io/google-containers/fluentd-elasticsearch:1.20 + resources: + limits: + memory: 200Mi + requests: + cpu: 100m + memory: 200Mi + volumeMounts: + - name: varlog + mountPath: /var/log + - name: varlibdockercontainers + mountPath: /var/lib/docker/containers + readOnly: true + terminationGracePeriodSeconds: 30 + volumes: + - name: varlog + hostPath: + path: /var/log + - name: varlibdockercontainers + hostPath: + path: /var/lib/docker/containers \ No newline at end of file From 4ecdd2c3cc28b7321ce90d80b1a18dbb2a9c84f2 Mon Sep 17 00:00:00 2001 From: lichuqiang Date: Wed, 2 Aug 2017 17:34:13 +0800 Subject: [PATCH 2/2] Fix sentence begins with an uppercase letter --- docs/getting-started-guides/vsphere.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/getting-started-guides/vsphere.md b/docs/getting-started-guides/vsphere.md index 6cd0c87e71..b26c945f97 100644 --- a/docs/getting-started-guides/vsphere.md +++ b/docs/getting-started-guides/vsphere.md @@ -136,7 +136,7 @@ This config file needs to be placed in the shared directory which should be acce scsicontrollertype = pvscsi ``` -Note: **```vm-name``` parameter is introduced in 1.6.4 release.** Both ```vm-uuid``` and ```vm-name``` are optional parameters. if ```vm-name``` is specified then ```vm-uuid``` is not used. if both are not specified then kubelet will get vm-uuid from `/sys/class/dmi/id/product_serial` and query vCenter to find the Node VM's name. +Note: **```vm-name``` parameter is introduced in 1.6.4 release.** Both ```vm-uuid``` and ```vm-name``` are optional parameters. If ```vm-name``` is specified then ```vm-uuid``` is not used. If both are not specified then kubelet will get vm-uuid from `/sys/class/dmi/id/product_serial` and query vCenter to find the Node VM's name. **```vsphere.conf``` for Worker Nodes:** (Only Applicable to 1.6.4 release and above. For older releases this file should have all the parameters specified in Master node's ```vSphere.conf``` file) @@ -159,7 +159,7 @@ Below is summary of supported parameters in the `vsphere.conf` file **Note:** ```vm-name``` is added in the release 1.6.4. Prior releases does not support this parameter. * ```working-dir``` can be set to empty ( working-dir = ""), if Node VMs are located in the root VM folder. -* ```vm-uuid``` is the VM Instance UUID of virtual machine. ```vm-uuid``` can be set to empty (```vm-uuid = ""```). if set to empty, this will be retrieved from /sys/class/dmi/id/product_serial file on virtual machine (requires root access). +* ```vm-uuid``` is the VM Instance UUID of virtual machine. ```vm-uuid``` can be set to empty (```vm-uuid = ""```). If set to empty, this will be retrieved from /sys/class/dmi/id/product_serial file on virtual machine (requires root access). * ```vm-uuid``` needs to be set in this format - ```423D7ADC-F7A9-F629-8454-CE9615C810F1```