The oc patch command fails with: yaml: found unexpected end of stream

Solution Verified - Updated -

Issue

  • The oc patch command fails with the following error:
C:\Users\user1\Downloads\openshift-client-windows>oc patch apiserver cluster --type=merge -p '{"spec":{"servingCerts": {"namedCertificates": [{"names": ["<api fqdn>"],"servingCertificate": {"name": "<secret name>"}}]}}}'
error: unable to parse "'{spec:{servingCerts:": yaml: found unexpected end of stream

Environment

  • Windows system - Windows prompt

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content