Jenkins "Jackson 2 API" default plugin has an issue in version 2.11.1 that fails deployment to k8s cluster.
Simplest break-fix is to downgrade the following plugins:
- Jackson 2 API v2.10.0,
- Kubernetes v1.21.3,
- Kubernetes Client API v4.6.3-1,
- Kubernetes Continuous Deploy v2.1.2,
- Kubernetes Credentials v0.5.0
More information on this problem here.
Extend the allowed nodePort range for kube API call by updating the /etc/kubernetes/manifests/kube-apiserver.yaml
with the following line:
--service-node-port-range=x1-x2
where x1
and x2
are desired port values.
The following Jenkins credentials are required:
- GitHub personal access token to allow repo hooks
These creds are used when configuring branch sources in pipeline setup. - K8s cluster config
Credential ID should be set tokubeconfig
for the existing config, but may be changed in the Jenkinsfile.
Grab the content of~/.kube/config
file and enter it directly into credentials field. - Docker Hub credentials
These are used to push docker image and pass it later to kube cluster for deployment.
Default ID should be set todocker_hub_login
but may be changed in the Jenkinsfile.