Send logs of all Kubernetes Pods to AWS CloudWatch Logs using Fluentd.

$ kubectl create serviceaccount tiller --namespace kube-system
apiVersion: v1
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: tiller-role-binding
roleRef:
kind: ClusterRole
name: cluster-admin
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
name: tiller
namespace: kube-system
$ kubectl apply -f rbac-config.yaml
clusterrolebinding.rbac.authorization.k8s.io "tiller-role-binding" configured
$ helm init --service-account tiller
$ kubectl get pods --namespace kube-system | grep tiller
tiller-deploy-fd7676c54-dvvl7 1/1 Running 0 1d
$ helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/
$ helm install --name fluentd -f .\fluentd-cloudwatch-values.yaml incubator/fluentd-cloudwatch

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store