Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ioideanh opened this issue May 15, 2023 · 7 comments
Open

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

ioideanh opened this issue May 15, 2023 · 7 comments

Comments

@ioideanh
Copy link

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
Copy link

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
Copy link

still the same here

@panromir
Copy link

panromir commented Feb 5, 2024

Just ran into this myself, issue persists. :(

@al3x609
Copy link

al3x609 commented Apr 10, 2024

my troubleshoot path.

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

short fix >

  • set storageClassName: local-storage on PVC manifest and try again.

TL;DR

  1. for ie. open JS inspector console in Chrome , go to console tab.
  2. then, click on check button, get the XHR response. 16th json object.
    real command without the SSH login
    kubectl --kubeconfig /etc/kubernetes/admin.conf -n development logs jekyll -c copy-jekyll-site | tail -1 | awk -F / '{print $NF}'

Screen Shot 2024-04-10 at 1 55 00

  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
  • [ x] his was only for thes backend and frontend Web interaction OK. until now.

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
Copy link

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
Copy link

AIWithShrey commented Aug 3, 2024

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
Copy link
Collaborator

We have merged #13
Please try the challenge again

@AIWithShrey @BitterDone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants