Add addon support for EFK logging
parent
7ed6005911
commit
c549bc61bf
|
@ -155,6 +155,12 @@ var settings = []Setting{
|
||||||
validations: []setFn{IsValidAddon},
|
validations: []setFn{IsValidAddon},
|
||||||
callbacks: []setFn{EnableOrDisableAddon},
|
callbacks: []setFn{EnableOrDisableAddon},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "efk",
|
||||||
|
set: SetBool,
|
||||||
|
validations: []setFn{IsValidAddon},
|
||||||
|
callbacks: []setFn{EnableOrDisableAddon},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "ingress",
|
name: "ingress",
|
||||||
set: SetBool,
|
set: SetBool,
|
||||||
|
@ -192,7 +198,7 @@ var settings = []Setting{
|
||||||
var ConfigCmd = &cobra.Command{
|
var ConfigCmd = &cobra.Command{
|
||||||
Use: "config SUBCOMMAND [flags]",
|
Use: "config SUBCOMMAND [flags]",
|
||||||
Short: "Modify minikube config",
|
Short: "Modify minikube config",
|
||||||
Long: `config modifies minikube config files using subcommands like "minikube config set vm-driver kvm"
|
Long: `config modifies minikube config files using subcommands like "minikube config set vm-driver kvm"
|
||||||
Configurable fields: ` + "\n\n" + configurableFields(),
|
Configurable fields: ` + "\n\n" + configurableFields(),
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
cmd.Help()
|
cmd.Help()
|
||||||
|
|
|
@ -0,0 +1,68 @@
|
||||||
|
# Copyright 2016 The Kubernetes Authors All rights reserved.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ReplicationController
|
||||||
|
metadata:
|
||||||
|
name: elasticsearch-logging
|
||||||
|
namespace: kube-system
|
||||||
|
labels:
|
||||||
|
k8s-app: elasticsearch-logging
|
||||||
|
kubernetes.io/minikube-addons: efk
|
||||||
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
k8s-app: elasticsearch-logging
|
||||||
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
k8s-app: elasticsearch-logging
|
||||||
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: elasticsearch-logging
|
||||||
|
image: gcr.io/google-containers/elasticsearch:v5.6.2
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
ports:
|
||||||
|
- containerPort: 9200
|
||||||
|
name: db
|
||||||
|
protocol: TCP
|
||||||
|
- containerPort: 9300
|
||||||
|
name: transport
|
||||||
|
protocol: TCP
|
||||||
|
volumeMounts:
|
||||||
|
- name: elasticsearch-logging
|
||||||
|
mountPath: /data
|
||||||
|
env:
|
||||||
|
- name: "NAMESPACE"
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.namespace
|
||||||
|
- name: MINIMUM_MASTER_NODES
|
||||||
|
value: "1"
|
||||||
|
initContainers:
|
||||||
|
- image: alpine:3.6
|
||||||
|
command: ["/sbin/sysctl", "-w", "vm.max_map_count=262144"]
|
||||||
|
name: elasticsearch-logging-init
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
volumes:
|
||||||
|
- name: elasticsearch-logging
|
||||||
|
emptyDir: {}
|
|
@ -0,0 +1,30 @@
|
||||||
|
# Copyright 2016 The Kubernetes Authors All rights reserved.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: elasticsearch-logging
|
||||||
|
namespace: kube-system
|
||||||
|
labels:
|
||||||
|
k8s-app: elasticsearch-logging
|
||||||
|
kubernetes.io/minikube-addons: efk
|
||||||
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 9200
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: db
|
||||||
|
selector:
|
||||||
|
k8s-app: elasticsearch-logging
|
|
@ -0,0 +1,293 @@
|
||||||
|
# Copyright 2016 The Kubernetes Authors All rights reserved.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: fluentd-es-config
|
||||||
|
namespace: kube-system
|
||||||
|
labels:
|
||||||
|
k8s-app: fluentd-es
|
||||||
|
kubernetes.io/minikube-addons: efk
|
||||||
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
|
data:
|
||||||
|
containers.input.conf: |-
|
||||||
|
# CRI Log Example:
|
||||||
|
# 2016-02-17T00:04:05.931087621Z stdout [info:2016-02-16T16:04:05.930-08:00] Some log text here
|
||||||
|
<source>
|
||||||
|
type tail
|
||||||
|
path /var/log/containers/*.log
|
||||||
|
pos_file /var/log/es-containers.log.pos
|
||||||
|
time_format %Y-%m-%dT%H:%M:%S.%NZ
|
||||||
|
tag kubernetes.*
|
||||||
|
read_from_head true
|
||||||
|
format multi_format
|
||||||
|
<pattern>
|
||||||
|
format json
|
||||||
|
time_key time
|
||||||
|
time_format %Y-%m-%dT%H:%M:%S.%NZ
|
||||||
|
</pattern>
|
||||||
|
<pattern>
|
||||||
|
format /^(?<time>.+)\b(?<stream>stdout|stderr)\b(?<log>.*)$/
|
||||||
|
time_format %Y-%m-%dT%H:%M:%S.%N%:z
|
||||||
|
</pattern>
|
||||||
|
</source>
|
||||||
|
system.input.conf: |-
|
||||||
|
# Example:
|
||||||
|
# 2015-12-21 23:17:22,066 [salt.state ][INFO ] Completed state [net.ipv4.ip_forward] at time 23:17:22.066081
|
||||||
|
<source>
|
||||||
|
type tail
|
||||||
|
format /^(?<time>[^ ]* [^ ,]*)[^\[]*\[[^\]]*\]\[(?<severity>[^ \]]*) *\] (?<message>.*)$/
|
||||||
|
time_format %Y-%m-%d %H:%M:%S
|
||||||
|
path /var/log/salt/minion
|
||||||
|
pos_file /var/log/es-salt.pos
|
||||||
|
tag salt
|
||||||
|
</source>
|
||||||
|
|
||||||
|
# Example:
|
||||||
|
# Dec 21 23:17:22 gke-foo-1-1-4b5cbd14-node-4eoj startupscript: Finished running startup script /var/run/google.startup.script
|
||||||
|
<source>
|
||||||
|
type tail
|
||||||
|
format syslog
|
||||||
|
path /var/log/startupscript.log
|
||||||
|
pos_file /var/log/es-startupscript.log.pos
|
||||||
|
tag startupscript
|
||||||
|
</source>
|
||||||
|
|
||||||
|
# Examples:
|
||||||
|
# time="2016-02-04T06:51:03.053580605Z" level=info msg="GET /containers/json"
|
||||||
|
# time="2016-02-04T07:53:57.505612354Z" level=error msg="HTTP Error" err="No such image: -f" statusCode=404
|
||||||
|
<source>
|
||||||
|
type tail
|
||||||
|
format /^time="(?<time>[^)]*)" level=(?<severity>[^ ]*) msg="(?<message>[^"]*)"( err="(?<error>[^"]*)")?( statusCode=($<status_code>\d+))?/
|
||||||
|
path /var/log/docker.log
|
||||||
|
pos_file /var/log/es-docker.log.pos
|
||||||
|
tag docker
|
||||||
|
</source>
|
||||||
|
|
||||||
|
# Example:
|
||||||
|
# 2016/02/04 06:52:38 filePurge: successfully removed file /var/etcd/data/member/wal/00000000000006d0-00000000010a23d1.wal
|
||||||
|
<source>
|
||||||
|
type tail
|
||||||
|
# Not parsing this, because it doesn't have anything particularly useful to
|
||||||
|
# parse out of it (like severities).
|
||||||
|
format none
|
||||||
|
path /var/log/etcd.log
|
||||||
|
pos_file /var/log/es-etcd.log.pos
|
||||||
|
tag etcd
|
||||||
|
</source>
|
||||||
|
|
||||||
|
# Multi-line parsing is required for all the kube logs because very large log
|
||||||
|
# statements, such as those that include entire object bodies, get split into
|
||||||
|
# multiple lines by glog.
|
||||||
|
|
||||||
|
# Example:
|
||||||
|
# I0204 07:32:30.020537 3368 server.go:1048] POST /stats/container/: (13.972191ms) 200 [[Go-http-client/1.1] 10.244.1.3:40537]
|
||||||
|
<source>
|
||||||
|
type tail
|
||||||
|
format multiline
|
||||||
|
multiline_flush_interval 5s
|
||||||
|
format_firstline /^\w\d{4}/
|
||||||
|
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
||||||
|
time_format %m%d %H:%M:%S.%N
|
||||||
|
path /var/log/kubelet.log
|
||||||
|
pos_file /var/log/es-kubelet.log.pos
|
||||||
|
tag kubelet
|
||||||
|
</source>
|
||||||
|
|
||||||
|
# Example:
|
||||||
|
# I1118 21:26:53.975789 6 proxier.go:1096] Port "nodePort for kube-system/default-http-backend:http" (:31429/tcp) was open before and is still needed
|
||||||
|
<source>
|
||||||
|
type tail
|
||||||
|
format multiline
|
||||||
|
multiline_flush_interval 5s
|
||||||
|
format_firstline /^\w\d{4}/
|
||||||
|
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
||||||
|
time_format %m%d %H:%M:%S.%N
|
||||||
|
path /var/log/kube-proxy.log
|
||||||
|
pos_file /var/log/es-kube-proxy.log.pos
|
||||||
|
tag kube-proxy
|
||||||
|
</source>
|
||||||
|
|
||||||
|
# Example:
|
||||||
|
# I0204 07:00:19.604280 5 handlers.go:131] GET /api/v1/nodes: (1.624207ms) 200 [[kube-controller-manager/v1.1.3 (linux/amd64) kubernetes/6a81b50] 127.0.0.1:38266]
|
||||||
|
<source>
|
||||||
|
type tail
|
||||||
|
format multiline
|
||||||
|
multiline_flush_interval 5s
|
||||||
|
format_firstline /^\w\d{4}/
|
||||||
|
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
||||||
|
time_format %m%d %H:%M:%S.%N
|
||||||
|
path /var/log/kube-apiserver.log
|
||||||
|
pos_file /var/log/es-kube-apiserver.log.pos
|
||||||
|
tag kube-apiserver
|
||||||
|
</source>
|
||||||
|
|
||||||
|
# Example:
|
||||||
|
# I0204 06:55:31.872680 5 servicecontroller.go:277] LB already exists and doesn't need update for service kube-system/kube-ui
|
||||||
|
<source>
|
||||||
|
type tail
|
||||||
|
format multiline
|
||||||
|
multiline_flush_interval 5s
|
||||||
|
format_firstline /^\w\d{4}/
|
||||||
|
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
||||||
|
time_format %m%d %H:%M:%S.%N
|
||||||
|
path /var/log/kube-controller-manager.log
|
||||||
|
pos_file /var/log/es-kube-controller-manager.log.pos
|
||||||
|
tag kube-controller-manager
|
||||||
|
</source>
|
||||||
|
|
||||||
|
# Example:
|
||||||
|
# W0204 06:49:18.239674 7 reflector.go:245] pkg/scheduler/factory/factory.go:193: watch of *api.Service ended with: 401: The event in requested index is outdated and cleared (the requested history has been cleared [2578313/2577886]) [2579312]
|
||||||
|
<source>
|
||||||
|
type tail
|
||||||
|
format multiline
|
||||||
|
multiline_flush_interval 5s
|
||||||
|
format_firstline /^\w\d{4}/
|
||||||
|
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
||||||
|
time_format %m%d %H:%M:%S.%N
|
||||||
|
path /var/log/kube-scheduler.log
|
||||||
|
pos_file /var/log/es-kube-scheduler.log.pos
|
||||||
|
tag kube-scheduler
|
||||||
|
</source>
|
||||||
|
|
||||||
|
# Example:
|
||||||
|
# I1104 10:36:20.242766 5 rescheduler.go:73] Running Rescheduler
|
||||||
|
<source>
|
||||||
|
type tail
|
||||||
|
format multiline
|
||||||
|
multiline_flush_interval 5s
|
||||||
|
format_firstline /^\w\d{4}/
|
||||||
|
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
||||||
|
time_format %m%d %H:%M:%S.%N
|
||||||
|
path /var/log/rescheduler.log
|
||||||
|
pos_file /var/log/es-rescheduler.log.pos
|
||||||
|
tag rescheduler
|
||||||
|
</source>
|
||||||
|
|
||||||
|
# Example:
|
||||||
|
# I0603 15:31:05.793605 6 cluster_manager.go:230] Reading config from path /etc/gce.conf
|
||||||
|
<source>
|
||||||
|
type tail
|
||||||
|
format multiline
|
||||||
|
multiline_flush_interval 5s
|
||||||
|
format_firstline /^\w\d{4}/
|
||||||
|
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
||||||
|
time_format %m%d %H:%M:%S.%N
|
||||||
|
path /var/log/glbc.log
|
||||||
|
pos_file /var/log/es-glbc.log.pos
|
||||||
|
tag glbc
|
||||||
|
</source>
|
||||||
|
|
||||||
|
# Example:
|
||||||
|
# I0603 15:31:05.793605 6 cluster_manager.go:230] Reading config from path /etc/gce.conf
|
||||||
|
<source>
|
||||||
|
type tail
|
||||||
|
format multiline
|
||||||
|
multiline_flush_interval 5s
|
||||||
|
format_firstline /^\w\d{4}/
|
||||||
|
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
||||||
|
time_format %m%d %H:%M:%S.%N
|
||||||
|
path /var/log/cluster-autoscaler.log
|
||||||
|
pos_file /var/log/es-cluster-autoscaler.log.pos
|
||||||
|
tag cluster-autoscaler
|
||||||
|
</source>
|
||||||
|
|
||||||
|
# Logs from systemd-journal for interesting services.
|
||||||
|
<source>
|
||||||
|
type systemd
|
||||||
|
filters [{ "_SYSTEMD_UNIT": "docker.service" }]
|
||||||
|
pos_file /var/log/gcp-journald-docker.pos
|
||||||
|
read_from_head true
|
||||||
|
tag docker
|
||||||
|
</source>
|
||||||
|
|
||||||
|
<source>
|
||||||
|
type systemd
|
||||||
|
filters [{ "_SYSTEMD_UNIT": "kubelet.service" }]
|
||||||
|
pos_file /var/log/gcp-journald-kubelet.pos
|
||||||
|
read_from_head true
|
||||||
|
tag kubelet
|
||||||
|
</source>
|
||||||
|
|
||||||
|
<source>
|
||||||
|
type systemd
|
||||||
|
filters [{ "_SYSTEMD_UNIT": "node-problem-detector.service" }]
|
||||||
|
pos_file /var/log/gcp-journald-node-problem-detector.pos
|
||||||
|
read_from_head true
|
||||||
|
tag node-problem-detector
|
||||||
|
</source>
|
||||||
|
forward.input.conf: |-
|
||||||
|
# Takes the messages sent over TCP
|
||||||
|
<source>
|
||||||
|
type forward
|
||||||
|
</source>
|
||||||
|
monitoring.conf: |-
|
||||||
|
# Prometheus Exporter Plugin
|
||||||
|
# input plugin that exports metrics
|
||||||
|
<source>
|
||||||
|
@type prometheus
|
||||||
|
</source>
|
||||||
|
|
||||||
|
<source>
|
||||||
|
@type monitor_agent
|
||||||
|
</source>
|
||||||
|
|
||||||
|
# input plugin that collects metrics from MonitorAgent
|
||||||
|
<source>
|
||||||
|
@type prometheus_monitor
|
||||||
|
<labels>
|
||||||
|
host ${hostname}
|
||||||
|
</labels>
|
||||||
|
</source>
|
||||||
|
|
||||||
|
# input plugin that collects metrics for output plugin
|
||||||
|
<source>
|
||||||
|
@type prometheus_output_monitor
|
||||||
|
<labels>
|
||||||
|
host ${hostname}
|
||||||
|
</labels>
|
||||||
|
</source>
|
||||||
|
|
||||||
|
# input plugin that collects metrics for in_tail plugin
|
||||||
|
<source>
|
||||||
|
@type prometheus_tail_monitor
|
||||||
|
<labels>
|
||||||
|
host ${hostname}
|
||||||
|
</labels>
|
||||||
|
</source>
|
||||||
|
output.conf: |-
|
||||||
|
# Enriches records with Kubernetes metadata
|
||||||
|
<filter kubernetes.**>
|
||||||
|
type kubernetes_metadata
|
||||||
|
</filter>
|
||||||
|
|
||||||
|
<match **>
|
||||||
|
type elasticsearch
|
||||||
|
log_level info
|
||||||
|
include_tag_key true
|
||||||
|
host elasticsearch-logging
|
||||||
|
port 9200
|
||||||
|
logstash_format true
|
||||||
|
# Set the chunk limits.
|
||||||
|
buffer_chunk_limit 2M
|
||||||
|
buffer_queue_limit 8
|
||||||
|
flush_interval 5s
|
||||||
|
# Never wait longer than 5 minutes between retries.
|
||||||
|
max_retry_wait 30
|
||||||
|
# Disable the limit on the number of retries (retry forever).
|
||||||
|
disable_retry_limit
|
||||||
|
# Use multiple threads for processing.
|
||||||
|
num_threads 2
|
||||||
|
</match>
|
|
@ -0,0 +1,69 @@
|
||||||
|
# Copyright 2016 The Kubernetes Authors All rights reserved.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ReplicationController
|
||||||
|
metadata:
|
||||||
|
name: fluentd-es
|
||||||
|
namespace: kube-system
|
||||||
|
labels:
|
||||||
|
k8s-app: fluentd-es
|
||||||
|
kubernetes.io/minikube-addons: efk
|
||||||
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
k8s-app: fluentd-es
|
||||||
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: fluentd-es
|
||||||
|
image: gcr.io/google-containers/fluentd-elasticsearch:v2.0.2
|
||||||
|
env:
|
||||||
|
- name: FLUENTD_ARGS
|
||||||
|
value: --no-supervisor -q
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
memory: 500Mi
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 200Mi
|
||||||
|
volumeMounts:
|
||||||
|
- name: varlog
|
||||||
|
mountPath: /var/log
|
||||||
|
- name: varlibdockercontainers
|
||||||
|
mountPath: /var/lib/docker/containers
|
||||||
|
readOnly: true
|
||||||
|
- name: libsystemddir
|
||||||
|
mountPath: /host/lib
|
||||||
|
readOnly: true
|
||||||
|
- name: config-volume
|
||||||
|
mountPath: /etc/fluent/config.d
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
|
volumes:
|
||||||
|
- name: varlog
|
||||||
|
hostPath:
|
||||||
|
path: /var/log
|
||||||
|
- name: varlibdockercontainers
|
||||||
|
hostPath:
|
||||||
|
path: /var/lib/docker/containers
|
||||||
|
# It is needed to copy systemd library to decompress journals
|
||||||
|
- name: libsystemddir
|
||||||
|
hostPath:
|
||||||
|
path: /usr/lib64
|
||||||
|
- name: config-volume
|
||||||
|
configMap:
|
||||||
|
name: fluentd-es-config
|
|
@ -0,0 +1,55 @@
|
||||||
|
# Copyright 2016 The Kubernetes Authors All rights reserved.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ReplicationController
|
||||||
|
metadata:
|
||||||
|
name: kibana-logging
|
||||||
|
namespace: kube-system
|
||||||
|
labels:
|
||||||
|
k8s-app: kibana-logging
|
||||||
|
kubernetes.io/minikube-addons: efk
|
||||||
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
k8s-app: kibana-logging
|
||||||
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
k8s-app: kibana-logging
|
||||||
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: kibana-logging
|
||||||
|
image: docker.elastic.co/kibana/kibana:5.6.2
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
env:
|
||||||
|
- name: ELASTICSEARCH_URL
|
||||||
|
value: http://elasticsearch-logging:9200
|
||||||
|
- name: SERVER_BASEPATH
|
||||||
|
value: /api/v1/proxy/namespaces/kube-system/services/kibana-logging
|
||||||
|
- name: XPACK_MONITORING_ENABLED
|
||||||
|
value: "false"
|
||||||
|
- name: XPACK_SECURITY_ENABLED
|
||||||
|
value: "false"
|
||||||
|
ports:
|
||||||
|
- containerPort: 5601
|
||||||
|
name: ui
|
||||||
|
protocol: TCP
|
|
@ -0,0 +1,30 @@
|
||||||
|
# Copyright 2016 The Kubernetes Authors All rights reserved.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: kibana-logging
|
||||||
|
namespace: kube-system
|
||||||
|
labels:
|
||||||
|
k8s-app: kibana-logging
|
||||||
|
kubernetes.io/minikube-addons: efk
|
||||||
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 5601
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: ui
|
||||||
|
selector:
|
||||||
|
k8s-app: kibana-logging
|
|
@ -23,6 +23,7 @@ The currently supported addons include:
|
||||||
* [Kubernetes Dashboard](https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/dashboard)
|
* [Kubernetes Dashboard](https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/dashboard)
|
||||||
* [Kube-dns](https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/dns)
|
* [Kube-dns](https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/dns)
|
||||||
* [Heapster](https://github.com/kubernetes/heapster): [Troubleshooting Guide](https://github.com/kubernetes/heapster/blob/master/docs/influxdb.md) Note:You will need to login to Grafana as admin/admin in order to access the console
|
* [Heapster](https://github.com/kubernetes/heapster): [Troubleshooting Guide](https://github.com/kubernetes/heapster/blob/master/docs/influxdb.md) Note:You will need to login to Grafana as admin/admin in order to access the console
|
||||||
|
* [EFK](https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/fluentd-elasticsearch)
|
||||||
* [Registry Credentials](https://github.com/upmc-enterprises/registry-creds)
|
* [Registry Credentials](https://github.com/upmc-enterprises/registry-creds)
|
||||||
|
|
||||||
If you would like to have minikube properly start/restart custom addons, place the addon(s) you wish to be launched with minikube in the `.minikube/addons` directory. Addons in this folder will be moved to the minikube VM and launched each time minikube is started/restarted.
|
If you would like to have minikube properly start/restart custom addons, place the addon(s) you wish to be launched with minikube in the `.minikube/addons` directory. Addons in this folder will be moved to the minikube VM and launched each time minikube is started/restarted.
|
||||||
|
|
|
@ -158,6 +158,38 @@ var Addons = map[string]*Addon{
|
||||||
"heapster-svc.yaml",
|
"heapster-svc.yaml",
|
||||||
"0640"),
|
"0640"),
|
||||||
}, false, "heapster"),
|
}, false, "heapster"),
|
||||||
|
"efk": NewAddon([]*BinDataAsset{
|
||||||
|
NewBinDataAsset(
|
||||||
|
"deploy/addons/efk/elasticsearch-rc.yaml",
|
||||||
|
constants.AddonsPath,
|
||||||
|
"elasticsearch-rc.yaml",
|
||||||
|
"0640"),
|
||||||
|
NewBinDataAsset(
|
||||||
|
"deploy/addons/efk/elasticsearch-svc.yaml",
|
||||||
|
constants.AddonsPath,
|
||||||
|
"elasticsearch-svc.yaml",
|
||||||
|
"0640"),
|
||||||
|
NewBinDataAsset(
|
||||||
|
"deploy/addons/efk/fluentd-es-rc.yaml",
|
||||||
|
constants.AddonsPath,
|
||||||
|
"fluentd-es-rc.yaml",
|
||||||
|
"0640"),
|
||||||
|
NewBinDataAsset(
|
||||||
|
"deploy/addons/efk/fluentd-es-configmap.yaml",
|
||||||
|
constants.AddonsPath,
|
||||||
|
"fluentd-es-configmap.yaml",
|
||||||
|
"0640"),
|
||||||
|
NewBinDataAsset(
|
||||||
|
"deploy/addons/efk/kibana-rc.yaml",
|
||||||
|
constants.AddonsPath,
|
||||||
|
"kibana-rc.yaml",
|
||||||
|
"0640"),
|
||||||
|
NewBinDataAsset(
|
||||||
|
"deploy/addons/efk/kibana-svc.yaml",
|
||||||
|
constants.AddonsPath,
|
||||||
|
"kibana-svc.yaml",
|
||||||
|
"0640"),
|
||||||
|
}, false, "efk"),
|
||||||
"ingress": NewAddon([]*BinDataAsset{
|
"ingress": NewAddon([]*BinDataAsset{
|
||||||
NewBinDataAsset(
|
NewBinDataAsset(
|
||||||
"deploy/addons/ingress/ingress-configmap.yaml",
|
"deploy/addons/ingress/ingress-configmap.yaml",
|
||||||
|
|
Loading…
Reference in New Issue