Search for a service that provides logging:
kubectl get clusterserviceclass \
-o custom-columns=Name:{.spec.externalName},\
ID:{.metadata.name},\
Description:{.spec.description} \
| grep loglogdna 234qkjvrptpy3thna4qttwt7m2nf6 The best logging service you will ever use
Find a free plan for the service:
kubectl get clusterserviceplans \
-o custom-columns=Name:{.spec.externalName},\
ID:{.metadata.name},\
Service\ ID:{.spec.clusterServiceClassRef.name},\
Free:{.spec.free} \
--sort-by=spec.clusterServiceClassRef.name \
| grep 234qkjvrptpy3thna4qttwt7m2nf6 | grep truequaco 23558gd5kaw5z462e3mvaknj5veuj 234qkjvrptpy3thna4qttwt7m2nf6 true
Create a LogDNA service instance and binding. This will create a LogDNA account for you through Manifold using the quaco free plan:
kubectl apply -f - <<EOF
apiVersion: servicecatalog.k8s.io/v1beta1
kind: ServiceInstance
metadata:
name: tutorial-logdna
spec:
clusterServiceClassExternalName: logdna
clusterServicePlanExternalName: quaco
EOFkubectl apply -f - <<EOF
apiVersion: servicecatalog.k8s.io/v1beta1
kind: ServiceBinding
metadata:
name: tutorial-logdna-binding
spec:
instanceRef:
name: tutorial-logdna
EOFThe service binding will create a secret holding configuration values for the service:
kubectl describe secret tutorial-logdna-bindingName: tutorial-logdna-binding
Namespace: default
Labels: <none>
Annotations: <none>
Type: Opaque
Data
====
RESOURCE_ID: 29 bytes
ACCOUNT: 10 bytes
KEY: 32 bytes
Next: Use the log aggregator