We have our K8s cluster running services, let's deploy our agent daemonset. You can read more about this in our Kubernetes Documentation you can also view our getting started quickly blog for detailed information on logging best practices.
kubectl create namespace scalyr
kubectl create secret generic scalyr-api-key --namespace=scalyr --from-literal=scalyr-api-key="<paste-key-here>">
curl -O https://raw.githubusercontent.com/scalyr/scalyr-agent-2/release/k8s/scalyr-agent-2-configmap.yaml
(edit and save)
kubectl create -f scalyr-agent-2-configmap.yaml
kubectl apply -f https://raw.githubusercontent.com/scalyr/scalyr-agent-2/release/k8s/no-kustomize/scalyr-service-account.yaml
kubectl apply -f https://raw.githubusercontent.com/scalyr/scalyr-agent-2/release/k8s/no-kustomize/scalyr-agent-2.yaml
kubectl create clusterrolebinding cluster-admin-binding --namespace=scalyr --clusterrole cluster-admin --user <google_cloud_account>
Once this is done, you should have Scalyr pods with a status of running.
Now lets generate a few logs by going to the frontend of the site.
kubectl get service frontend-external
View logs in Scalyr
Go to dataset.com and log in.
You should be taken to your logStart page and see a list of deployments under the cluster name defined in the configmap
Comments
0 comments
Please sign in to leave a comment.