Kubernetes Cookbook by Saito Hideto & Lee Hui-Chuan Chloe & Hsu Ke-Jou Carol

Kubernetes Cookbook by Saito Hideto & Lee Hui-Chuan Chloe & Hsu Ke-Jou Carol

Author:Saito, Hideto & Lee, Hui-Chuan Chloe & Hsu, Ke-Jou Carol [Saito, Hideto]
Language: eng
Format: azw3
Publisher: Packt Publishing
Published: 2016-06-30T04:00:00+00:00


As you can see, three pods are created to solve this job. Also, since the selector part is removed, the selector is copied from the labels.

Pod as a daemon set

If a Kubernetes daemon set is created, the defined pod will be deployed in every single node. It is guaranteed that the running containers occupy equal resources in each node. In this scenario, the container usually works as the daemon process.

For example, the following template has an ubuntu image container that keeps checking its memory usage half minute a time. We are going to build it as a daemon set:

# cat daemonset-free.yaml apiVersion: extensions/v1beta1 kind: DaemonSet metadata: name: ram-check spec: selector: app: checkRam version: v1 template: metadata: labels: app: checkRam owner: Amy version: v1 spec: containers: - name: ubuntu-free image: ubuntu command: ["/bin/bash","-c","while true; do free; sleep 30; done"] restartPolicy: Always



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.