Skip to content

Commit

Permalink
feat(fluent): add sample fluent-bit deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
mborne committed Oct 10, 2023
1 parent c6af435 commit 9722e15
Show file tree
Hide file tree
Showing 3 changed files with 850 additions and 0 deletions.
31 changes: 31 additions & 0 deletions fluent/k8s-deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#/bin/bash

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

# Create namespace fluent if not exists
kubectl create namespace fluent --dry-run=client -o yaml | kubectl apply -f -

# Deploy fluent-bit with helm
helm -n fluent upgrade --install fluent-bit oci://registry-1.docker.io/bitnamicharts/fluent-bit -f ${SCRIPT_DIR}/values.yaml

# Allow fluent-bit sa to retreive infos about containers
cat <<EOF | kubectl apply -f -
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: fluent-bit-read
subjects:
- kind: ServiceAccount
name: fluent-bit
namespace: fluent
roleRef:
kind: ClusterRole
name: view
apiGroup: rbac.authorization.k8s.io
EOF






Loading

0 comments on commit 9722e15

Please sign in to comment.