I’m taking up the Kubernetes challenge.
Lab- Kubernetes Challenge 1
In challenge 1, when we are creating the pod, initContainer is getting into the crashloopbackoff state.
Below are the logs of the initContainer
/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 `<main>'
Here is my pod yaml
apiVersion: v1
kind: Pod
metadata:
name: jekyll
namespace: development
labels:
app.kubernetes.io/name: MyApp
run: jekyll
spec:
containers:
- name: jekyll
image: kodekloud/jekyll-serve
volumeMounts:
- name: site
mountPath: /site
initContainers:
- name: copy-jekyll-site
image: kodekloud/jekyll
command: ["jekyll", "new", "/site"]
volumeMounts:
- name: site
mountPath: /site
volumes:
- name: site
persistentVolumeClaim:
claimName: jekyll-site