apiVersion: apps/v1 kind: DaemonSet metadata: name: nginx labels: kubernetes.courselabs.co: daemonsets spec: selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - image: nginx:1.18-alpine name: nginx command: ['sh', '-c', "echo '

Kubernetes Course Labs

' > /usr/share/nginx/html/index.html"] volumeMounts: - name: logs mountPath: /var/log/nginx volumes: - name: logs hostPath: path: /volumes/nginx-logs type: DirectoryOrCreate