Add Command for using default docker log-driver
[Issue] Container Log file which is located in /var/log/containers cannot be founded when k8s cluster is created based on Fedora or CentOS It is because docker set log-driver "journald" as it's default [Solution] Added Command into both configure-kubernetes-master and minion It search string "--log-driver=journald" in /etc/sysconfig/docker and then remove it. After that, docker'll write logs into it's default. Closes-Bug: #1690717 Change-Id: Ie8449c04c792e17e084187e5e1853c0f957717ce
This commit is contained in:
parent
4b1e591ab0
commit
bb376f2a48
|
@ -59,6 +59,9 @@ sed -i '
|
|||
HOSTNAME_OVERRIDE=$(hostname --short | sed 's/\.novalocal//')
|
||||
KUBELET_ARGS="--register-node=true --register-schedulable=false --config=/etc/kubernetes/manifests --hostname-override=${HOSTNAME_OVERRIDE}"
|
||||
|
||||
# For using default log-driver, other options should be ignored
|
||||
sed -i 's/\-\-log\-driver\=journald//g' /etc/sysconfig/docker
|
||||
|
||||
if [ -n "${INSECURE_REGISTRY_URL}" ]; then
|
||||
KUBELET_ARGS="${KUBELET_ARGS} --pod-infra-container-image=${INSECURE_REGISTRY_URL}/google_containers/pause\:0.8.0"
|
||||
echo "INSECURE_REGISTRY='--insecure-registry ${INSECURE_REGISTRY_URL}'" >> /etc/sysconfig/docker
|
||||
|
|
|
@ -59,6 +59,9 @@ if [ ! -f /usr/bin/udevadm ]; then
|
|||
ln -s /sbin/udevadm /usr/bin/udevadm
|
||||
fi
|
||||
|
||||
# For using default log-driver, other options should be ignored
|
||||
sed -i 's/\-\-log\-driver\=journald//g' /etc/sysconfig/docker
|
||||
|
||||
if [ -n "${INSECURE_REGISTRY_URL}" ]; then
|
||||
KUBELET_ARGS="${KUBELET_ARGS} --pod-infra-container-image=${INSECURE_REGISTRY_URL}/google_containers/pause\:0.8.0"
|
||||
echo "INSECURE_REGISTRY='--insecure-registry ${INSECURE_REGISTRY_URL}'" >> /etc/sysconfig/docker
|
||||
|
|
Loading…
Reference in New Issue