[root@hello ~/efk]# cd kubernetes/cluster/addons/fluentd-elasticsearch/
[root@hello ~/efk/kubernetes/cluster/addons/fluentd-elasticsearch]# kubectl apply -f ./
namespace/logging created
service/elasticsearch-logging created
serviceaccount/elasticsearch-logging created
clusterrole.rbac.authorization.k8s.io/elasticsearch-logging created
clusterrolebinding.rbac.authorization.k8s.io/elasticsearch-logging created
statefulset.apps/elasticsearch-logging created
configmap/fluentd-es-config-v0.2.1 created
serviceaccount/fluentd-es created
clusterrole.rbac.authorization.k8s.io/fluentd-es created
clusterrolebinding.rbac.authorization.k8s.io/fluentd-es created
daemonset.apps/fluentd-es-v3.1.1 created
deployment.apps/kibana-logging created
service/kibana-logging created
查看pod状态:
[root@hello ~]# kubectl get pod -n logging
NAME READY STATUS RESTARTS AGE
elasticsearch-logging-0 1/1 Running 0 2m17s
elasticsearch-logging-1 1/1 Running 0 96s
fluentd-es-v3.1.1-qw9dj 1/1 Running 1 (97s ago) 2m16s
kibana-logging-75bd6cccf5-pskrr 1/1 Running 1 (106s ago) 2m16s
[root@hello ~]#
[root@hello ~]# kubectl get service -n logging
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
elasticsearch-logging ClusterIP None <none> 9200/TCP,9300/TCP 2m41s
kibana-logging ClusterIP 10.68.145.186 <none> 5601/TCP 2m40s
[root@hello ~]#