[Answered ]-Using python manage.py migrate –check in kubernetes readinessProbe never succeeds

1👍

The solution for the issue is to increase timeoutSeconds parameter, which is by default set to 1 second:

  • timeoutSeconds: Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1.

After increasing the timeoutSeconds parameter, the application is able to pass the readiness probe.

Example snippet of the deployment with timeoutSeconds parameter set to 5:

      containers:                                                                             
        - name: myapp                                                                      
          ...
          imagePullPolicy: Always                                                             
          readinessProbe:                                                                     
            exec:                                                                             
              command: ["python", "manage.py", "migrate", "--check"]                          
            initialDelaySeconds: 15                                                           
            periodSeconds: 5
            timeoutSeconds: 5

Leave a comment