Kubernetes Challenge 1

I’m trying the Kubernetes Challenge 1, but I’m having problems running the init container:

root@controlplane ~ ➜  k logs jekyll 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)

The pod is set up as follows:

apiVersion: v1
kind: Pod
metadata:
  creationTimestamp: null
  labels:
    run: jekyll
  name: jekyll
spec:
  initContainers:
  - image: kodekloud/jekyll
    name: copy-jekyll-site
    command: [ "jekyll", "new", "/site" ]
    volumeMounts:
    - mountPath: /site
      name: site
  containers:
  - image: kodekloud/jekyll-serve
    name: jekyll
    resources: {}
    volumeMounts:
    - mountPath: /site
      name: site
  volumes:
  - name: site
    persistentVolumeClaim:
      claimName: jekyll-site
  dnsPolicy: ClusterFirst
  restartPolicy: Always
status: {}

And everything else seems to be set up properly – all tasks are checked green except for the initContainer command check.

Is this a problem with the site, or am I missing something?

Hi @steven001

Your manifest is fine. I just tried it in the lab and it worked. Please reset the lab and try again. Ensure to create the pvc, pod and service in the development namespace.

The pod takes a long time to be ready. You can wait on it with the following command

kubectl wait -n development --for=condition=ready pod -l run=jekyll --timeout 120s
1 Like