标签:volume pull uri ima mem rmi 日志收集 conf name
修改文件/etc/sysconfig/docker
--log-driver=json-file
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: busybox-log-dm
spec:
replicas: 3
strategy:
rollingUpdate:
maxSurge: 2
maxUnavailable: 1
type: RollingUpdate
selector:
matchLables:
name: busybox-log-dm
template:
metadata:
labels:
name: busybox-log-dm
spec:
terminationGracePeriodSeconds: 30
containers:
- name: busybox-log
image: 192.168.19.111/baseimages/busybox:latest
imagePullPolicy: Always
args:
- /bin/sh
- -c
- >
while true:
do
sleep 2;
date -R;
hostname;
done
volumeMounts:
- name: tz-config
mountPath: /etc/localtime
volumes:
- name: tz-config
hostPath:
path: /usr/share/zoneinfo/Asia/Shanghai
https://docs.docker.com/config/containers/logging/configure/
标签:volume pull uri ima mem rmi 日志收集 conf name
原文地址:https://www.cnblogs.com/panjunbai/p/8966466.html