Ubuntu 20.04
Sponsored Link

MicroK8s : Enable Fluentd2020/08/17

 
Enable Fluentd add-on to configure Elasticsearch, Fluentd, Kibana (EFK Stack) on MicroK8s Cluster.
[1] Enable built-in Fluentd add-on on primary Node.
root@dlp:~#
microk8s enable fluentd dns

Enabling DNS
Applying manifest
serviceaccount/coredns created
configmap/coredns created
deployment.apps/coredns created
service/kube-dns created
clusterrole.rbac.authorization.k8s.io/coredns created
clusterrolebinding.rbac.authorization.k8s.io/coredns created
Restarting kubelet
DNS is enabled
Enabling Fluentd-Elasticsearch
Labeling nodes
node/dlp.srv.world labeled
Addon dns is already enabled.
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.1.5 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-v2.2.0 created
deployment.apps/kibana-logging created
service/kibana-logging created
Fluentd-Elasticsearch is enabled

root@dlp:~#
microk8s kubectl get services -n kube-system

NAME                    TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                  AGE
elasticsearch-logging   ClusterIP   10.152.183.169   <none>        9200/TCP                 3m14s
kibana-logging          ClusterIP   10.152.183.218   <none>        5601/TCP                 3m14s
kube-dns                ClusterIP   10.152.183.10    <none>        53/UDP,53/TCP,9153/TCP   3m31s

root@dlp:~#
microk8s kubectl get pods -A

NAMESPACE     NAME                              READY   STATUS    RESTARTS   AGE
kube-system   coredns-588fd544bf-cpp79          1/1     Running   0          94s
kube-system   elasticsearch-logging-0           1/1     Running   0          77s
kube-system   fluentd-es-v2.2.0-tljxj           1/1     Running   0          77s
kube-system   kibana-logging-84f486f46b-th5sj   1/1     Running   0          77s

root@dlp:~#
microk8s kubectl cluster-info

Kubernetes master is running at https://127.0.0.1:16443
Elasticsearch is running at https://127.0.0.1:16443/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy
Kibana is running at https://127.0.0.1:16443/api/v1/namespaces/kube-system/services/kibana-logging/proxy
CoreDNS is running at https://127.0.0.1:16443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
Metrics-server is running at https://127.0.0.1:16443/api/v1/namespaces/kube-system/services/https:metrics-server:/proxy

# run kube proxy

# replace access permission for your needs

root@dlp:~#
microk8s kubectl proxy --address=0.0.0.0 --accept-hosts=.*

Starting to serve on [::]:8001
[2] Access to [https://(MicroK8s primary node's Hostname or IP address):8001/api/v1/namespaces/kube-system/services/kibana-logging/proxy] with an web browser on a Client computer in local network. Then, that's OK if following Kibana Dashboard is shown.
Matched Content