Skip to content

Enable K8S Debug Logs Using ConfigMap Changes

To enable K8S-enabled debug logs in the Privacera DataServer, follow these steps:

Replace the following placeholders with the actual values:

  • <NAMESPACE>: namespace where Privacera Manager is installed.
  • <POD>: DataServer pod name.
  • <PRIVACERA_DOWNLOAD_URL>: URL of the custom build package.
  1. SSH into the instance where Privacera Manager is installed.
  2. Edit the DataServer ConfigMap:
    Bash
    kubectl edit cm dataserver-conf -n <NAMESPACE>
    
  3. Update the log level:
    1. Search for dataserver-env-custom.sh and update the following variables to enable debug logging:
      Bash
      export PRIVACERA_LOG_LEVEL=DEBUG
      
    2. Save and exit the editor.
  4. Restart the DataServer pod to apply the changes:
    Bash
    kubectl rollout restart deployment/dataserver -n <NAMESPACE>
    
  5. Check the status of the pods:
    Bash
    kubectl get pods -n <NAMESPACE>
    
  6. Login to the DataServer pod and check if the log level has been updated:
    Bash
    kubectl exec -it <POD>  -n <NAMESPACE> -- bash
    grep -rina "PRIVACERA_LOG_LEVEL" /workdir/privacera-dataserver/conf/dataserver-env-custom.sh
    
  7. Navigate to the logs directory and collect the logs for debugging:
    Bash
    cd /workdir/privacera-dataserver/logs/dataserver/