kodekloudhub / kubernetes-challenges

174 stars 272 forks source link

lab-kubernetes-challenge-1 Pod fails to Validate #11

Open ioideanh opened 1 year ago

ioideanh commented 1 year ago

lab-kubernetes-challenge-1 You can not validate the Pod part, the command always fails to validate. After attempting this a couple of times and failing on the command, I copied and pasted your pod yaml and it still fails to validate

AbhishekHyd123 commented 11 months ago

same here. The pod is not getting scheduled on any node. It is evident from this thread. https://kodekloud.slack.com/archives/C02LS58EGQ4/p1693683541377539 See all the snapshots given by Abhishek-G The error says out of 9 points mentioned for pod, below one is not completed correctly.

initContainer: 'copy-jekyll-site', command: [ "jekyll", "new", "/site" ] (command to run: jekyll new /site)

Can someone please work on it ? Also notify us when the root cause is identified.

masteryyh commented 8 months ago

still the same here

panromir commented 7 months ago

Just ran into this myself, issue persists. :(

al3x609 commented 5 months ago

my troubleshoot path.

What I show below is just a possible cause of the error, and its solution

short fix >

  1. in a sucessfull response, the command return site word with some hex unicode chars
  2. you can test the command directy over the k8s cluster. check de exit code from previews cmd with $? Screen Shot 2024-04-10 at 2 15 19

What was the response in failed case ?

Something different from zero and without any text in STD output to compare with.


  1. check the PV status Screen Shot 2024-04-10 at 2 38 43 , before that nothing.

  2. Now, if, between tests, you delete the PVC, an error is generated with PV plugins, indicating that you need recreate the PV for a manual release

Screen Shot 2024-04-10 at 2 51 30

because there is not an available StorageClass for automatic thasks (no provisioner) Screen Shot 2024-04-10 at 4 18 30

  1. Now if you forgot set the field storage class on the PVC manifest, this will trigger an error.
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: jekyll-site
  namespace: development
spec:
  volumeName: jekyll-site
  accessModes:
    - ReadWriteMany
  #storageClassName: local-storage
  resources:
    requests:
      storage: 1Gi

Screen Shot 2024-04-10 at 4 35 30

but!! __the test for PVC status as the fist part show ... Everything is going well with the PVC. Screen Shot 2024-04-10 at 4 47 43

And the deployment of the POD shows us...

Screen Shot 2024-04-10 at 4 51 45


finaly with the approach ...

Screen Shot 2024-04-10 at 5 54 28

Screen Shot 2024-04-10 at 6 15 52

BitterDone commented 2 months ago

I'm also having this issue, exactly as described numerous times here: https://kodekloud.com/community/t/kodekloud-challenge-1-issue-with-creating-the-pod-issue-with-command/131666

I've reset the lab about 4 times. I've diff'd my yaml files against those in the Github solutions and mine were the same. Even after pasting the solution yaml files and commands, it doesn't validate on the command: [ "jekyll", "new", "/site" ] step.

AIWithShrey commented 1 month ago

Still no official fix for this problem? Running into this myself now. When I look at the logs of the pod, here's what I see:

kubectl logs -n development jekyll 
Defaulted container "jekyll" out of: jekyll, copy-jekyll-site (init)
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
ffi-1.17.0-x86_64-linux-musl requires rubygems version >= 3.3.22, which is
incompatible with the current version, 3.0.3
fireflycons commented 2 weeks ago

We have merged https://github.com/kodekloudhub/kubernetes-challenges/pull/13 Please try the challenge again

@AIWithShrey @BitterDone