mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
cluster/gce/coreos: Update addon manifests, add node-problem-detector.
Also bumped CNI version.
This commit is contained in:
parent
f3c5d4e62b
commit
16d69f9f37
@ -160,6 +160,10 @@ function configure-master-addons() {
|
|||||||
CLUSTER_REGISTRY_DISK_SIZE=$(convert-bytes-gce-kube "${CLUSTER_REGISTRY_DISK_SIZE}")
|
CLUSTER_REGISTRY_DISK_SIZE=$(convert-bytes-gce-kube "${CLUSTER_REGISTRY_DISK_SIZE}")
|
||||||
evaluate-manifests-dir ${MANIFESTS_DIR}/addons/registry ${addon_dir}/registry
|
evaluate-manifests-dir ${MANIFESTS_DIR}/addons/registry ${addon_dir}/registry
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "${ENABLE_NODE_PROBLEM_DETECTOR}" == "true" ]]; then
|
||||||
|
evaluate-manifests-dir ${MANIFESTS_DIR}/addons/node-problem-detector ${addon_dir}/node-problem-detector
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function configure-master-components() {
|
function configure-master-components() {
|
||||||
|
@ -1,27 +1,27 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ReplicationController
|
kind: ReplicationController
|
||||||
metadata:
|
metadata:
|
||||||
name: kube-dns-v11
|
name: kube-dns-v14
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
labels:
|
labels:
|
||||||
k8s-app: kube-dns
|
k8s-app: kube-dns
|
||||||
version: v11
|
version: v14
|
||||||
kubernetes.io/cluster-service: "true"
|
kubernetes.io/cluster-service: "true"
|
||||||
spec:
|
spec:
|
||||||
replicas: ${DNS_REPLICAS}
|
replicas: ${DNS_REPLICAS}
|
||||||
selector:
|
selector:
|
||||||
k8s-app: kube-dns
|
k8s-app: kube-dns
|
||||||
version: v11
|
version: v14
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
k8s-app: kube-dns
|
k8s-app: kube-dns
|
||||||
version: v11
|
version: v14
|
||||||
kubernetes.io/cluster-service: "true"
|
kubernetes.io/cluster-service: "true"
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: etcd
|
- name: kubedns
|
||||||
image: gcr.io/google_containers/etcd-amd64:2.2.1
|
image: gcr.io/google_containers/kubedns-amd64:1.3
|
||||||
resources:
|
resources:
|
||||||
# TODO: Set memory limits when we've profiled the container for large
|
# TODO: Set memory limits when we've profiled the container for large
|
||||||
# clusters, then set request = limit to keep this container in
|
# clusters, then set request = limit to keep this container in
|
||||||
@ -29,33 +29,6 @@ spec:
|
|||||||
# "burstable" category so the kubelet doesn't backoff from restarting it.
|
# "burstable" category so the kubelet doesn't backoff from restarting it.
|
||||||
limits:
|
limits:
|
||||||
cpu: 100m
|
cpu: 100m
|
||||||
memory: 500Mi
|
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 50Mi
|
|
||||||
command:
|
|
||||||
- /usr/local/bin/etcd
|
|
||||||
- -data-dir
|
|
||||||
- /var/etcd/data
|
|
||||||
- -listen-client-urls
|
|
||||||
- http://127.0.0.1:2379,http://127.0.0.1:4001
|
|
||||||
- -advertise-client-urls
|
|
||||||
- http://127.0.0.1:2379,http://127.0.0.1:4001
|
|
||||||
- -initial-cluster-token
|
|
||||||
- skydns-etcd
|
|
||||||
volumeMounts:
|
|
||||||
- name: etcd-storage
|
|
||||||
mountPath: /var/etcd/data
|
|
||||||
- name: kube2sky
|
|
||||||
image: gcr.io/google_containers/kube2sky:1.15
|
|
||||||
resources:
|
|
||||||
# TODO: Set memory limits when we've profiled the container for large
|
|
||||||
# clusters, then set request = limit to keep this container in
|
|
||||||
# guaranteed class. Currently, this container falls into the
|
|
||||||
# "burstable" category so the kubelet doesn't backoff from restarting it.
|
|
||||||
limits:
|
|
||||||
cpu: 100m
|
|
||||||
# Kube2sky watches all pods.
|
|
||||||
memory: 200Mi
|
memory: 200Mi
|
||||||
requests:
|
requests:
|
||||||
cpu: 100m
|
cpu: 100m
|
||||||
@ -78,32 +51,23 @@ spec:
|
|||||||
# only setup the /readiness HTTP server once that's available.
|
# only setup the /readiness HTTP server once that's available.
|
||||||
initialDelaySeconds: 30
|
initialDelaySeconds: 30
|
||||||
timeoutSeconds: 5
|
timeoutSeconds: 5
|
||||||
command:
|
|
||||||
- /kube2sky
|
|
||||||
args:
|
args:
|
||||||
# command = "/kube2sky"
|
# command = "/kube-dns"
|
||||||
- --domain=${DNS_DOMAIN}
|
- --domain=${DNS_DOMAIN}.
|
||||||
- name: skydns
|
- --dns-port=10053
|
||||||
image: gcr.io/google_containers/skydns:2015-10-13-8c72f8c
|
ports:
|
||||||
resources:
|
- containerPort: 10053
|
||||||
# TODO: Set memory limits when we've profiled the container for large
|
name: dns-local
|
||||||
# clusters, then set request = limit to keep this container in
|
protocol: UDP
|
||||||
# guaranteed class. Currently, this container falls into the
|
- containerPort: 10053
|
||||||
# "burstable" category so the kubelet doesn't backoff from restarting it.
|
name: dns-tcp-local
|
||||||
limits:
|
protocol: TCP
|
||||||
cpu: 100m
|
- name: dnsmasq
|
||||||
memory: 200Mi
|
image: gcr.io/google_containers/dnsmasq:1.1
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 50Mi
|
|
||||||
command:
|
|
||||||
- /skydns
|
|
||||||
args:
|
args:
|
||||||
# command = "/skydns"
|
- --cache-size=1000
|
||||||
- -machines=http://127.0.0.1:4001
|
- --no-resolv
|
||||||
- -addr=0.0.0.0:53
|
- --server=127.0.0.1#10053
|
||||||
- -ns-rotate=false
|
|
||||||
- -domain=${DNS_DOMAIN}.
|
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 53
|
- containerPort: 53
|
||||||
name: dns
|
name: dns
|
||||||
@ -112,7 +76,7 @@ spec:
|
|||||||
name: dns-tcp
|
name: dns-tcp
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
- name: healthz
|
- name: healthz
|
||||||
image: gcr.io/google_containers/exechealthz:1.0
|
image: gcr.io/google_containers/exechealthz-amd64:1.0
|
||||||
resources:
|
resources:
|
||||||
# keep request = limit to keep this container in guaranteed class
|
# keep request = limit to keep this container in guaranteed class
|
||||||
limits:
|
limits:
|
||||||
@ -121,15 +85,10 @@ spec:
|
|||||||
requests:
|
requests:
|
||||||
cpu: 10m
|
cpu: 10m
|
||||||
memory: 20Mi
|
memory: 20Mi
|
||||||
command:
|
|
||||||
- /exechealthz
|
|
||||||
args:
|
args:
|
||||||
- -cmd=nslookup kubernetes.default.svc.${DNS_DOMAIN} 127.0.0.1 >/dev/null
|
- -cmd=nslookup kubernetes.default.svc.${DNS_DOMAIN} 127.0.0.1 >/dev/null
|
||||||
- -port=8080
|
- -port=8080
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
volumes:
|
dnsPolicy: Default # Don't use cluster DNS.
|
||||||
- name: etcd-storage
|
|
||||||
emptyDir: {}
|
|
||||||
dnsPolicy: Default # Don't use cluster DNS.
|
|
||||||
|
@ -20,7 +20,7 @@ spec:
|
|||||||
kubernetes.io/cluster-service: "true"
|
kubernetes.io/cluster-service: "true"
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- image: gcr.io/google_containers/elasticsearch:1.8
|
- image: gcr.io/google_containers/elasticsearch:1.9
|
||||||
name: elasticsearch-logging
|
name: elasticsearch-logging
|
||||||
resources:
|
resources:
|
||||||
# keep request = limit to keep this container in guaranteed class
|
# keep request = limit to keep this container in guaranteed class
|
||||||
@ -40,4 +40,4 @@ spec:
|
|||||||
mountPath: /data
|
mountPath: /data
|
||||||
volumes:
|
volumes:
|
||||||
- name: es-persistent-storage
|
- name: es-persistent-storage
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
|
@ -0,0 +1,44 @@
|
|||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: DaemonSet
|
||||||
|
metadata:
|
||||||
|
name: node-problem-detector-v0.1
|
||||||
|
namespace: kube-system
|
||||||
|
labels:
|
||||||
|
k8s-app: node-problem-detector
|
||||||
|
version: v0.1
|
||||||
|
kubernetes.io/cluster-service: "true"
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
k8s-app: node-problem-detector
|
||||||
|
version: v0.1
|
||||||
|
kubernetes.io/cluster-service: "true"
|
||||||
|
spec:
|
||||||
|
hostNetwork: true
|
||||||
|
containers:
|
||||||
|
- name: node-problem-detector
|
||||||
|
image: gcr.io/google_containers/node-problem-detector:v0.1
|
||||||
|
env:
|
||||||
|
# Config the host ip and port of apiserver.
|
||||||
|
- name: "KUBERNETES_SERVICE_HOST"
|
||||||
|
value: ${INSTANCE_PREFIX}-master
|
||||||
|
- name: "KUBERNETES_SERVICE_PORT"
|
||||||
|
value: "443"
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: "200m"
|
||||||
|
memory: "100Mi"
|
||||||
|
requests:
|
||||||
|
cpu: "20m"
|
||||||
|
memory: "20Mi"
|
||||||
|
volumeMounts:
|
||||||
|
- name: log
|
||||||
|
mountPath: /log
|
||||||
|
readOnly: true
|
||||||
|
volumes:
|
||||||
|
- name: log
|
||||||
|
hostPath:
|
||||||
|
path: /var/log/
|
@ -35,7 +35,7 @@ coreos:
|
|||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
ExecStartPre=/usr/bin/mkdir -p /opt/cni
|
ExecStartPre=/usr/bin/mkdir -p /opt/cni
|
||||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error --location --create-dirs --output /opt/downloads/cni.tar.gz https://storage.googleapis.com/kubernetes-release/network-plugins/cni-42c4cb842dad606a84e93aad5a4484ded48e3046.tar.gz
|
ExecStartPre=/usr/bin/curl --fail --silent --show-error --location --create-dirs --output /opt/downloads/cni.tar.gz https://storage.googleapis.com/kubernetes-release/network-plugins/cni-c864f0e1ea73719b8f4582402b0847064f9883b0.tar.gz
|
||||||
ExecStart=/usr/bin/tar xf /opt/downloads/cni.tar.gz -C /opt/cni/
|
ExecStart=/usr/bin/tar xf /opt/downloads/cni.tar.gz -C /opt/cni/
|
||||||
|
|
||||||
- name: kubernetes-download-salt.service
|
- name: kubernetes-download-salt.service
|
||||||
|
@ -35,7 +35,7 @@ coreos:
|
|||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
ExecStartPre=/usr/bin/mkdir -p /opt/cni
|
ExecStartPre=/usr/bin/mkdir -p /opt/cni
|
||||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error --location --create-dirs --output /opt/downloads/cni.tar.gz https://storage.googleapis.com/kubernetes-release/network-plugins/cni-42c4cb842dad606a84e93aad5a4484ded48e3046.tar.gz
|
ExecStartPre=/usr/bin/curl --fail --silent --show-error --location --create-dirs --output /opt/downloads/cni.tar.gz https://storage.googleapis.com/kubernetes-release/network-plugins/cni-c864f0e1ea73719b8f4582402b0847064f9883b0.tar.gz
|
||||||
ExecStart=/usr/bin/tar xf /opt/downloads/cni.tar.gz -C /opt/cni/
|
ExecStart=/usr/bin/tar xf /opt/downloads/cni.tar.gz -C /opt/cni/
|
||||||
|
|
||||||
- name: kubernetes-install-docker2aci.service
|
- name: kubernetes-install-docker2aci.service
|
||||||
|
@ -35,7 +35,7 @@ coreos:
|
|||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
ExecStartPre=/usr/bin/mkdir -p /opt/cni
|
ExecStartPre=/usr/bin/mkdir -p /opt/cni
|
||||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error --location --create-dirs --output /opt/downloads/cni.tar.gz https://storage.googleapis.com/kubernetes-release/network-plugins/cni-42c4cb842dad606a84e93aad5a4484ded48e3046.tar.gz
|
ExecStartPre=/usr/bin/curl --fail --silent --show-error --location --create-dirs --output /opt/downloads/cni.tar.gz https://storage.googleapis.com/kubernetes-release/network-plugins/cni-c864f0e1ea73719b8f4582402b0847064f9883b0.tar.gz
|
||||||
ExecStart=/usr/bin/tar xf /opt/downloads/cni.tar.gz -C /opt/cni/
|
ExecStart=/usr/bin/tar xf /opt/downloads/cni.tar.gz -C /opt/cni/
|
||||||
|
|
||||||
- name: kubernetes-download-manifests.service
|
- name: kubernetes-download-manifests.service
|
||||||
|
@ -35,7 +35,7 @@ coreos:
|
|||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
ExecStartPre=/usr/bin/mkdir -p /opt/cni
|
ExecStartPre=/usr/bin/mkdir -p /opt/cni
|
||||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error --location --create-dirs --output /opt/downloads/cni.tar.gz https://storage.googleapis.com/kubernetes-release/network-plugins/cni-42c4cb842dad606a84e93aad5a4484ded48e3046.tar.gz
|
ExecStartPre=/usr/bin/curl --fail --silent --show-error --location --create-dirs --output /opt/downloads/cni.tar.gz https://storage.googleapis.com/kubernetes-release/network-plugins/cni-c864f0e1ea73719b8f4582402b0847064f9883b0.tar.gz
|
||||||
ExecStart=/usr/bin/tar xf /opt/downloads/cni.tar.gz -C /opt/cni/
|
ExecStart=/usr/bin/tar xf /opt/downloads/cni.tar.gz -C /opt/cni/
|
||||||
|
|
||||||
- name: kubernetes-install-rkt.service
|
- name: kubernetes-install-rkt.service
|
||||||
|
Loading…
Reference in New Issue
Block a user