Answers: <p>Kubernetes supports TCP, HTTP, and shell-exec <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes" rel="nofollow noreferrer">probes</a> for an application startup, readiness, and liveness <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/" rel="nofollow noreferrer">health checks</a>. If your application is a web application, you can use HTTP based liveness healthcheck as shown in the following code snippet:</p>
  <pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
  kind: Pod
  metadata:
    labels:
      test: liveness
    name: liveness-http
  spec:
    containers:
    - name: liveness
      image: k8s.gcr.io/liveness
      args:
      - /server
      livenessProbe:
        httpGet:
          path: /healthz
          port: 8080
        initialDelaySeconds: 3
        periodSeconds: 300
  </code></pre>
  
Answers: CC BY-SA 4.0
Answers: 2021-05-24T14:26:20.113Z
Answers: 2021-05-24T14:26:20.113Z
Answers: Faheem
Body: <p>I am a newbie in k8s. I have a .net framework application written in C# running in K8s orchestration. I simply want to check in fixed interval (lets say in every 300sec) that my application which is running inside pod is responding or not.<br/>
  Can anyone suggest how to implement this ?</p>
  
Tags: <kubernetes><dotnet><healthcheck>
Title: How to check application responding in Kubernetes
UserDisplayName: solveit
ThreadText: # How to check application responding in Kubernetes
  
  (Asked by: username_0 on 2021-05-24)
  
  I am a newbie in k8s. I have a .net framework application written in C# running in K8s orchestration. I simply want to check in fixed interval (lets say in every 300sec) that my application which is running inside pod is responding or not.  
  Can anyone suggest how to implement this ?
  
  **Tags:** kubernetes, dotnet, healthcheck
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-05-24. Score: 1 | Accepted answer
  
  Kubernetes supports TCP, HTTP, and shell-exec [probes](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) for an application startup, readiness, and liveness [health checks](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/). If your application is a web application, you can use HTTP based liveness healthcheck as shown in the following code snippet:
  
  ```yaml
  apiVersion: v1
  kind: Pod
  metadata:
    labels:
      test: liveness
    name: liveness-http
  spec:
    containers:
    - name: liveness
      image: k8s.gcr.io/liveness
      args:
      - /server
      livenessProbe:
        httpGet:
          path: /healthz
          port: 8080
        initialDelaySeconds: 3
        periodSeconds: 300
  
  ```
  
  
  ---
  
  