Description of problem: oc patch cannot use yaml format Version-Release number of selected component (if applicable): oc v1.0.6-202-ga195624 openshift v1.0.6-202-ga195624 kubernetes v1.1.0-alpha.0-1605-g44c91b1 How reproducible: Always Steps to Reproduce: 1. oc login 2. Create a project and create applications $ oc new-project newprj $ oc new-app -f origin/examples/sample-app/application-template-stibuild.json 3. Check dc field before oc patch: 1> $ oc get dc 2> $ oc get dc/database -t '{{ .spec.replicas }}' | grep '.' 4. Apply oc patch. For comparison, use json first: 1> $ oc patch dc database -p '{"spec": {"replicas": 2}}' 2> $ oc get dc/database -t '{{ .spec.replicas }}' | grep '.' 5. Use yaml 1> $ oc patch dc/database -p ' spec: replicas: 3 ' 2> $ oc get dc/database -t '{{ .spec.replicas }}' | grep '.' Actual results: 5 2> Error from server: invalid character 's' looking for beginning of value Expected results: 4 1> Outputs: "database" patched 2> Outputs: 2 5 1> Outputs: "database" patched 2> Outpus: 3 Additional info: `oc help patch' says: -p, --patch='': The patch to be applied to the resource JSON file But it also says: JSON and YAML formats are accepted. A link of YAML example: https://github.com/openshift/origin/blob/9185d680f64acd9d24f1846ef8a0472f5e0fcd01/docs/cli.md#oc-patch
See https://github.com/kubernetes/kubernetes/pull/14831
picked downstream into https://github.com/openshift/origin/pull/4910
Checked with the latest code (oc/openshift version v1.0.6-466-g72df0dc), and the issue has been fixed