Unable to create LogSink or ClusterLogSink resources in TKGi cluster
search cancel

Unable to create LogSink or ClusterLogSink resources in TKGi cluster

book

Article ID: 298637

calendar_today

Updated On:

Products

VMware Tanzu Kubernetes Grid Integrated Edition

Issue/Introduction


Unable to create LogSink or ClusterLogSink resources in TKGI cluster

Symptoms:
Getting the following error while trying to create the Sink resources:

kubectl apply -f YOUR-SINK.yml
no matches for kind "LogSink" in version "pksapi.io/v1beta1"

Environment

Product Version: 1.8

Resolution

Checklist:
Check that LogSink resources have been enabled in TKGI Tile---> In-Cluster Monitoring.

Verify that it has been applied to the Container Service Deployment:

bosh -d pivotal-container-service-################# manifest > container-service.yml
grep log_sink_resources_enabled container-service.yml
        log_sink_resources_enabled: true


Verify that the Sink and Cluster Sink Custom Resources have been created:

kubectl api-resources --api-group=pksapi.io
NAME                 SHORTNAMES   APIGROUP    NAMESPACED   KIND
clusterlogsinks                   pksapi.io   false        ClusterLogSink
clustermetricsinks                pksapi.io   false        ClusterMetricSink
logsinks                          pksapi.io   true         LogSink
metricsinks                       pksapi.io   true         MetricSink

If they do not exist, check the status of the Observability Manager Pod and review its logs. When this Pod is started, it creates the Custom Resource Definitions for LogSinks and ClusterLogSinks.

kubectl get pods -n pks-system
kubectl logs observability-manager-XXXXXXXXX -n pks-system

Check if there are any Custom Add-ons in the Cluster Plan that could be impacting the creation of the Custom Resource Definitions.
TKGI Tile----> Plan ----> Add-ons

Check if there are Kubernetes profiles or Network Profiles used in the creation of the Cluster.