When you do a copy of the yaml file in this document, there are a lot of wrong indentations/whitespaces and you'll get errors like:
error: error converting YAML to JSON: yaml: line 8: did not find expected key
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@mrdfuse Thanks for bringing this to our attention. Your feedback has been shared with the content owner for further review.
Looks like an extra 'space' before 'roleRef'
Use this instead until the docs are fixed:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: containerHealth-log-reader
rules:
- apiGroups: [""]
resources: ["pods/log"]
verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: containerHealth-read-logs-global
roleRef:
kind: ClusterRole
name: containerHealth-log-reader
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: User
name: clusterUser
apiGroup: rbac.authorization.k8s.io
Oh yeah, it's not that I wanted a corrected version, I have done that myself :) I just wanted to point this out because other people will surely have the same problem when copy pasting.
@mrdfuse & @femsulu - I've just returned from holiday and catching up on things. I'll bug this and see about getting it corrected as soon as possible. Thank you for bringing this to our attention and my apologies for the problems it caused.
@mrdfuse Thanks for bringing this to our attention. We will now close this issue. If there are further questions regarding this matter, please tag me in a comment. I will reopen it and we will gladly continue the discussion.