Wednesday, November 18, 2020

ERROR: Can't construct a java object for tag:yaml - Kubernetes Jenkins Deployment issue

ERROR: Can't construct a java object for,2002:io.kubernetes.client.openapi.models.V1Deployment; exception=Class not found: io.kubernetes.client.openapi.models.V1Deployment

 in 'reader', line 1, column 1:
    apiVersion: apps/v1

Caused by: hudson.remoting.ProxyException: org.yaml.snakeyaml.error.YAMLException: Class not found: io.kubernetes.client.openapi.models.V1Deployment at org.yaml.snakeyaml.constructor.Constructor.getClassForNode( at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.getConstructor( at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct( ... 30 more

Try the deployment in Jenkins slave node instead of deploying from Jenkins Master.


  1. I have found the solution to this problem. I have tried many times and it's working perfectly. Kubernetes CD plugin should be Version 1.0. No need to downgrade other plugins.

    Kindly hit this [link|] to download the version 1.0.0 .hpi file of the Kubernetes cd plugin from the official Jenkins plugin site.

    Reference -


How to setup monitoring on Kubernetes Cluster using Prometheus and Grafana | Setup monitoring on EKS Cluster using Prometheus and Grafana

What is Prometheus? Prometheus is an open source monitoring tool Provides out-of-the-box monitoring capabilities for the Kubernetes containe...