Welcome to the Linux Foundation Forum!

Running Jenkins on Kubernetes - Manual Jenkins Installation Using kubectl and YAML Files (2)

milkman285
milkman285 Posts: 1
edited April 7 in LFS267 Class Forum

Environment:
Master Node (Ubuntu) - Compute Engine VM
Worker Node (Ubuntu) - Compute Engine VM

  • Created Service successfully
  • NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
    jenkins ClusterIP 10.98.228.91 8080/TCP,50000/TCP 69m

Next Step Create the Ingress Controller:
Copied the text and pasted into my jenkinsIngress.yaml file and get the following error:
The Ingress "jenkins" is invalid: spec.rules[0].http.paths[0].pathType: Required value: pathType must be specified

add pathType: Prefix...it works

However, the next step to create a StatefulSet

student@master:~$ vim jenkinsStateful.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: jenkins
namespace: jenkins
spec:
selector:
matchLabels:
app: jenkins
serviceName: jenkins
replicas: 1

I get the following error:
The StatefulSet "jenkins" is invalid: spec.template.metadata.labels: Invalid value: map[string]string(nil): selector does not match template labels

Please let me know if there is something I may have missed

Answers

  • luisviveropena
    luisviveropena Posts: 1,233

    Hi @milkman285,

    Sorry for taking long, I'm checking into this now.

    Regards,
    Luis.

  • mstepien
    mstepien Posts: 468

    Hi @milkman285,

    We're currently updating the course materials. Once the new content is available, we'll post a notification in the forum. Please make sure to follow the forum to stay updated on the latest information.

    Best regards,
    Magda

Categories

Upcoming Training