Create storage class on vsphere:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: fast
provisioner: kubernetes.io/vsphere-volume
parameters:
diskformat: zeroedthick
datastore: LUN01
kubectl create -f ./storage-class.yml
Make the fast
storage class the default:
kubectl patch storageclass fast -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
kubectl get events
NOTE: If there's an error about missing folder this is a bug in PKS 1.5 https://community.pivotal.io/s/article/failed-to-get-the-folder-reference create folder manually in vsphere, probably a folder with a guid name in
pks-vms
folder
Deploy jenkins helm chart:
kubectl create namespace jenkins
helm install --namespace jenkins --name jenkins stable/jenkins
Get jenkins admin password:
printf $(kubectl get secret --namespace jenkins jenkins -o jsonpath="{.data.jenkins-admin-password}" | base64 --decode);echo
Delete helm deployment:
helm del --purge jenkins
- Manually pull, save, load docker containers listed in
values.yaml
to your private repository. - Update
values.yaml
images to pull the image from your private repo. - On start Jenkins will attempt to install several plugins, these should be commented out in the
values.yaml
installPlugins:
- kubernetes:1.18.2
- workflow-job:2.33
- workflow-aggregator:2.6
- credentials-binding:1.19
- git:3.11.0
- This will cause an error with the
/templates/config.yaml
file in that it expects to find the version of thekubernetes
plugin. Delete theif
statement.
before:
{{- if semverCompare ">=1.20.2" (include "jenkins.kubernetes-version" . ) }}
<directConnection>false</directConnection>
{{- end }}
after:
<directConnection>false</directConnection>
helm package
the charthelm install...
- You'll have to download and manually install the plugins within the Jenkins UI, each dependency will have to be installed first :(