<p>helm install failing with the below error </p>

<p>command</p>

<pre><code>helm install --name helloworld helm
</code></pre>

<p>Below is the error once I ran above command </p>

<pre><code>Error: release usagemetrics failed: Deployment in version "v1" cannot be handled as a Deployment: v1.Deployment.Spec: v1.DeploymentSpec.Template: v1.PodTemplateSpec.Spec: v1.PodSpec.Containers: []v1.Container: v1.Container.LivenessProbe: readObjectStart: expect { or n, but found 9, error found in #10 byte of ...|ssProbe":9001,"name"|..., bigger context ...|"imagePullPolicy":"IfNotPresent","livenessProbe":9001,"name":"usagemetrics-helm","ports":[{"containe|...
</code></pre>

<p>Below is the deployment.yaml file i feel the issue in liveness and probeness configuration . </p>

<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: release-name-helm
spec:
  replicas: 1
  selector:
    matchLabels:
      app: release-name-helm
      release: release-name
  template:
    metadata:
      labels:
        app: release-name-helm
        release: release-name
    spec:
      containers:
        - name: release-name-helm
          imagePullPolicy: IfNotPresent
          image: hellworld
          ports:
            - name: "http"
              containerPort: 9001
          envFrom:
            - configMapRef:
                name: release-name-helm
            - secretRef:
                name: release-name-helm
          livenessProbe:
            9001
          readinessProbe:
            9001
</code></pre>

Pandit Biradar
<p>The problem seems to be related to the <code>livenessProbe</code> and <code>readynessProbe</code> that are both wrong.</p>
<p>An example of <code>livenessProbe</code> of http from the documentation <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/" rel="nofollow noreferrer">here</a> is:</p>
<pre><code>livenessProbe

  httpGet:
    path: /healthz
    port: 8080
    httpHeaders:
      - name: Custom-Header
        value: Awesome
    initialDelaySeconds: 3
    periodSeconds: 3
</code></pre>
<p>Your yamls if you only want to have a check of the port should be like:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: release-name-helm
spec:
  replicas: 1
  selector:
    matchLabels:
      app: release-name-helm
      release: release-name
  template:
    metadata:
      labels:
        app: release-name-helm
        release: release-name
    spec:
      containers:
        - name: release-name-helm
          imagePullPolicy: IfNotPresent
          image: hellworld
          ports:
            - name: &quot;http&quot;
              containerPort: 9001
          envFrom:
            - configMapRef:
                name: release-name-helm
            - secretRef:
                name: release-name-helm
          livenessProbe:
            tcpSocket:
              port: 9001
            initialDelaySeconds: 5
            periodSeconds: 10
          readinessProbe:
            tcpSocket:
              port: 9001
            initialDelaySeconds: 5
            periodSeconds: 10
</code></pre>
