Kodekloud Challenge #1 issue with creating the pod - issue with command

Thanks @Carim-Manzur for the explaination!

I changed commands in init container to clear /site before starting jekyll and it did the trick.
Here is that part of manifest-

initContainers:
- image: kodekloud/jekyll
name: copy-jekyll-site
command: [“/bin/sh”, “-c”]
args: [“rm -Rf /site; jekyll new /site”]
volumeMounts:
- mountPath: /site
name: site

1 Like

I love all the it works on my box snarky answers

1 Like

this is all still happening. Finished the challenge with 20 mins to spare, spend the next 20 mins trying to troubleshoot why my pod wont come up (so essentially failed the challenge, because of the above). Before "complete the challenge according to the instructions or GH reference), i even compared mine to GH, no diff. Replaced the pod same result., replaced the po defination with GH po def and replaced the po. Same result.

So in short. Still happening. Please fix. This is causing more anxiety than it should…Thank you

Also this is the 3rd week in a row for the same thing. Please fix

For reference, let’s look quickly at the diagram:

The lab works, so it makes most sense to figure out why the pod does not “come up”. The most likely cause, judging by the dependencies, is that your PVC is not binding correctly. You haven’t mentioned if you’ve tried to look for events in the development namespace – this is where you can check for errors related to binding the PVC to the PV, and if there’s a problem using the PVC in the pod. Since you’re not using a deployment here, this suggests that there was an error loading its YAML. So what did you see?

Another possibility is that the initContainer defined for the pod is not executing right. What did you check there?

I’m still having issues with this lab, it’s always the initContainer: ‘copy-jekyll-site’, command: [ “jekyll”, “new”, “/site” ] (command to run: jekyll new /site) instruction.
I’ve done it my way and also followed github instructions, it doesn’t matter, always failing. And the problem about gems persist.

I assume you’ve looked at the solution in the github repo. What does k describe pod say for the jeckly pod?

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

For -c jekyll

There is a ticket for engineering team to update that challenge with latest versions of Jekyll and ensure the containers start correctly. When it will be done, I have no indication.

2 Likes

I reported the same for init container

k logs -n development jekyll -c copy-jekyll-site
Running bundle install in /site... 
  Bundler: 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`.
  Bundler: Fetching gem metadata from https://rubygems.org/............
  Bundler: Fetching gem metadata from https://rubygems.org/.
  Bundler: Resolving dependencies...
  Bundler: ffi-1.17.0-x86_64-linux-musl requires rubygems version >= 3.3.22, which is
  Bundler: incompatible with the current version, 3.0.3

k logs -n development jekyll -c copy-jekyll-site:

/usr/local/lib/ruby/site_ruby/2.5.0/bundler/resolver.rb:287:in block in verify_gemfile_dependencies_are_found!': Could not find gem 'minima (~> 2.0)' in any of the gem sources listed in your Gemfile. (Bundler::GemNotFound) from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/resolver.rb:255:in each’
from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/resolver.rb:255:in verify_gemfile_dependencies_are_found!' from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/resolver.rb:49:in start’
from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/resolver.rb:22:in resolve' from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:258:in resolve’
from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:170:in specs' from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:237:in specs_for’
from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:226:in requested_specs' from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/runtime.rb:108:in block in definition_method’
from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/runtime.rb:20:in setup' from /usr/local/lib/ruby/site_ruby/2.5.0/bundler.rb:107:in setup’
from /usr/local/bundle/gems/jekyll-3.8.5/lib/jekyll/plugin_manager.rb:50:in require_from_bundler' from /usr/local/bundle/gems/jekyll-3.8.5/exe/jekyll:11:in <top (required)>’
from /usr/local/bundle/bin/jekyll:23:in load' from /usr/local/bundle/bin/jekyll:23:in

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

Absolutely @Carim-Manzur - this was exactly the problem. I don’t know what caused the initContainer to crash, but it could not start again.
I deleted the files in /site manually on the node01 to which i got using ssh node01.
Init container started normally.