
Kubernetes version 1.15 or higher is required.
How do you want to install Vector and set up Better Stack?
Create namespace configuration file:
kubectl create namespace --dry-run=client -o yaml vector > namespace.yaml
Save the following config as kustomization.yaml
:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# Override the namespace of all of the resources we manage.
namespace: vector
bases:
# Include Vector recommended base (from git).
- github.com/vectordotdev/vector/distribution/kubernetes/vector-agent
images:
# Override the Vector image to pin the version used.
- name: timberio/vector
newName: timberio/vector
newTag: 0.28.1-distroless-libc
resources:
# The namespace previously created to keep the resources in.
- namespace.yaml
configMapGenerator:
# ConfigMap with Vector config.
- name: vector
behavior: replace
files:
- vector-agent.toml
patches:
# Prevent data dir read-only volume mount issue: https://github.com/vectordotdev/helm-charts/issues/226
# Set volumeMount readOnly: false
- patch: |-
- op: replace
path: /spec/template/spec/containers/0/volumeMounts/3/readOnly
value: false
target:
group: apps
version: v1
kind: DaemonSet
name: vector
Download Vector configuration for your source:
wget -O vector-agent.toml \
https://logs.betterstack.com/vector-toml/kubernetes/$SOURCE_TOKEN
Reload Vector configuration and restart it:
kubectl apply -k .
kubectl rollout restart -n vector daemonset/vector
You should see your logs in Better Stack -> Live tail.
Kubernetes version 1.15 or higher is required.
Please let us know at hello@betterstack.com.
We're happy to help! ๐
Add and update Helm Vector repository:
helm repo add vector https://helm.vector.dev
helm repo update
Download Vector Helm config for your source:
wget -O values.yaml \
https://logs.betterstack.com/vector-helm/$SOURCE_TOKEN
Apply Vector Helm Chart to your cluster:
helm install vector vector/vector \
--namespace vector \
--create-namespace \
--values values.yaml
You should see your logs in Better Stack -> Live tail.
Kubernetes version 1.15 or higher is required.
Please let us know at hello@betterstack.com.
We're happy to help! ๐
Interested in reading about installing and configuring Vector in more detail?
Check out the official Vector Kubernetes installation guide.