<p>Is it possible to fake a container to always be ready/live in kubernetes so that kubernetes thinks that the container is live and doesn't try to kill/recreate the container? I am looking for a quick and hacky solution, preferably.</p>

user674669
<p>Liveness and Readiness probes are <strong>not required</strong> by k8s controllers, <strong>you can simply remove them</strong> and your containers will be always live/ready.</p>
<p>If you want the hacky approach anyways, use the <code>exec</code> probe (instead of <code>httpGet</code>) with something dummy that always returns <code>0</code> as exit code. For example:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  labels:
    app: nginx
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.7.9
        ports:
        - containerPort: 80
        livenessProbe:
          exec:
            command:
            - touch
            - /tmp/healthy
        readinessProbe:
          exec:
            command:
            - touch
            - /tmp/healthy
</code></pre>
<p>Please note that this will turn into ready/live state only in case you did not specify the flag <code>readOnlyRootFilesystem: true</code>.</p>
