Answers: <p>Running means that container(s) in your Pod is/are not crashed. Entrypoint started, and command is still running.</p>
  <p>Creating that yaml (assuming we fixed case / caps characters aren't at the right place, ...). Pod will be Running. Why: because process has no reason to crash. Because if I inspect that image it uses, entrypoint/cmd is just some /bin/sh -c /bin/sh. Shell will start and keep running.</p>
  
Answers: CC BY-SA 4.0
Answers: 2022-09-30T20:13:26.213Z
Answers: 2022-10-02T05:38:34.383Z
Answers: 2022-10-02T05:38:34.383Z
Answers: SYN
Body: <p>This is an interview question, It asks apply the following yaml file into your k8s cluster:</p>
  <pre class="lang-yaml prettyprint-override"><code>apiVersion: V1
  Kind: pod
  Metadata:
    Name: freebox
    Spec:
      Containers:
      - Name: busybox
        Image: busybox:latest
        Imagepullpolicy: IfNotPresent
  </code></pre>
  <p>When running the kubectl get pod freebox, could the status be running? Why?</p>
  
Comments: CC BY-SA 4.0
Comments: 2022-09-30T19:49:21.337Z
Comments: That's not a valid manifest. If you attempt to apply it, you'll get something like, `error: error validating "pod.yaml": error validating data: kind not set; if you choose to ignore these errors, turn validation off with --validate=false`.
Comments: larsks
Tags: <kubernetes>
Title: Can the status be running after applying the yaml file?
UserDisplayName: J JIA
ThreadText: # Can the status be running after applying the yaml file?
  
  (Asked by: username_0 on 2022-09-30)
  
  This is an interview question, It asks apply the following yaml file into your k8s cluster:
  
  ```yaml
  apiVersion: V1
  Kind: pod
  Metadata:
    Name: freebox
    Spec:
      Containers:
      - Name: busybox
        Image: busybox:latest
        Imagepullpolicy: IfNotPresent
  
  ```
  
  When running the kubectl get pod freebox, could the status be running? Why?
  
  **Tags:** kubernetes
  
  > **Comments:**
  > **username_1**: That's not a valid manifest. If you attempt to apply it, you'll get something like, `error: error validating "pod.yaml": error validating data: kind not set; if you choose to ignore these errors, turn validation off with --validate=false`.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2022-09-30. Score: 0
  
  Running means that container(s) in your Pod is/are not crashed. Entrypoint started, and command is still running.
  
  Creating that yaml (assuming we fixed case / caps characters aren't at the right place, ...). Pod will be Running. Why: because process has no reason to crash. Because if I inspect that image it uses, entrypoint/cmd is just some /bin/sh -c /bin/sh. Shell will start and keep running.
  
  
  ---
  
  