Deploy a Jekyll app

Hi @Ayman and @Inderpreet

I know this request may not be valid but It’s really not fair to lose 50% score because of not being patient. I’d appreciate if you let me do the task again or mark it done.

Unfortunately I did not wait for containers to be in running status and submitted the task.

@Nasri, seems like pods are not in running state, when you clicked on finish button.

@rahul456 yes, so it means there is no way to let me do it again without losing 50% score?

I think there is no chance to do in second time without losing 50%. But don’t be focus on 50% score. At least you got what you did wrong and you’re going to improve it in the second attempt.

1 Like

@Tej-Singh-Rana and @aansari
I have issue completing this task. I keep getting this error:

thor@jump_host /$ kubectl apply -f p.yml
error: error validating “p.yml”: error validating data: ValidationError(Pod.spec.volumes[0].persistentVolumeClaim): invalid type for io.k8s.api.core.v1.PersistentVolumeClaimVolumeSource: got “string”, expected “map”; if you choose to ignore these errors,turn validation off with --validate=false
thor@jump_host /$

here is my full yaml file. considering formatting is always crap with this platform.

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: jekyll-site-nautilus
  namespace: jekyll-namespace-nautilus
spec:
  storageClassName: manual
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Gi
---
apiVersion: v1
kind: Pod
metadata:
  name: jekyll-pod-nautilus
  namespace: jekyll-namespace-nautilus
  labels:
    app: jykll
spec:
  volumes:
  - name: site
    persistentVolumeClaim:
      claimName: jekyll-site-nautilus

  initContainers:
  - name: jekyll-init-nautilus
    image: kodekloud/jekyll
    imagePullPolicy: IfNotPresent
    command: [ "jekyll", "new", "/site" ] 
    volumeMounts:
      - name: site
        mountPath: /site

  containers:
  - name: jekyll-container-nautilus
    image: kodekloud/jekyll-serve
    volumeMounts:
      - name: site
        mountPath: /site
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: jykll
  name: jekyll-container-nautilus
  namespace: jekyll-namespace-nautilus
spec:
  selector:
    app: jykll
  type: NodePort
  ports:
  - port: 808
    targetPort: 4000
    nodePort: 31181
status:
  loadBalancer: {}

Can you guys advice what is wrong, I feel like there is something wrong with the underline system.

This is the mistake : indentation is not correct
You should move claimName two spaces to the right

volumes:
  - name: site
    persistentVolumeClaim:
      claimName: jekyll-site-nautilus
1 Like

I’ll go with @Devops.
You can use backtick as well to post the code in good format. It looks messy.

Use three backtick(```)
<-------Code HERE----------->
Close with three backtick(```)
1 Like

@Tej-Singh-Rana @Devops dont worry already fixed it.
by the way for those who come across this task, there is a trick in the second point where
2. PersistentVolume is already created on jump_host.
so you have to make sure you force this volume to accept binding the pvc you create.

H,

Issue with jekyll app , the deployment is successful but the task failed as POD was always pending ?


apiVersion: v1

kind: PersistentVolumeClaim

metadata:

name: jekyll-site-nautilus

namespace: jekyll-namespace-nautilus

spec:

storageClassName: manual

accessModes:

- ReadWriteMany

resources:

requests:

  storage: 1Gi

apiVersion: v1

kind: Pod

metadata:

name: jekyll-pod-nautilus

namespace: jekyll-namespace-nautilus

labels:

app: jykll

spec:

volumes:

  • name: site

    persistentVolumeClaim:

    claimName: jekyll-site-nautilus

initContainers:

  • name: jekyll-init-nautilus

    image: kodekloud/jekyll

    imagePullPolicy: IfNotPresent

    command: [ “jekyll”, “new”, “/site” ]

    volumeMounts:

    • name: site

      mountPath: /site

containers:

  • name: jekyll-container-nautilus

    image: kodekloud/jekyll-serve

    volumeMounts:

    • name: site

      mountPath: /site


apiVersion: v1

kind: Service

metadata:

labels:

app: jykll

name: jekyll-container-nautilus

namespace: jekyll-namespace-nautilus

spec:

selector:

app: jykll

type: NodePort

ports:

  • port: 8080

    targetPort: 4000

    nodePort: 31181

    protocol: TCP

status:

loadBalancer: {}

@Tej-Singh-Rana @admins can you please let me know what the issue was?

Thanks,
Sudheer

volumes:

name: site

persistentVolumeClaim:

      claimName: jekyll-site-nautilus

can you please double check the claim name has correct indentation

Yes, that looks fine on the file which i created and it might due to i copied it here might have looked like a wrong indentation.

please paste the exact error you get after deploying the pod