Conjur - secrets-provider-for-k8s - Application POD not re-starting/recreating after secret are updated

Conjur - secrets-provider-for-k8s - Application POD not re-starting/recreating after secret are updated

93
Created On 11/10/26 10:58 AM - Last Modified 11/10/26 16:11 PM


Symptom


Application POD will not restart/recreate after secret are updated on the Conjur side, the Secrets Provider for K8 POD will recreate.



Environment


13.0;13.2;13.1;13.3;13.4;13.5 Conjur Client Libraries

Kubernetes Secrets mode



Cause


Possible cause is due to the wrong setting of "livenessProbe" & "lifecycle" and Incorrect permissions on application POD and the secrets provider POD being run as different users, which is not allowing the application pod's liveness probe to properly read and delete the sentinel files. 

 

For the permission issue, the error below can be seen in the describe POD events:

  Warning  Unhealthy  47s   kubelet  Liveness probe failed: rm: cannot remove './CONJUR_SECRETS_UPDATED': No such file or directory



Resolution


  • To fix the permission issue: 

 Add the following "securityContext" to both the application POD and the secrets provider POD in the deployment file:

             securityContext:
             runAsUser: 9999

             This can be any ID but ensure that its the same for both POD's.


Example: 

- name: application

  image: application:latest

  imagePullPolicy: Always

  securityContext:

   runAsUser: 9999

- image: secrets-provider-for-k8s:latest

  imagePullPolicy: Always

  name: cyberark-secrets-provider-for-k8s

  securityContext:

   runAsUser: 9999

  volumeMounts:

 

 

Note: Any changes to deployment file will require redeploying of the POD's for the changes to implement. 



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000001aO1CAI&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail