Skip to content

Instantly share code, notes, and snippets.

@someword
Created October 18, 2018 21:29
Show Gist options
  • Save someword/e461beef564a2ccf8e197ccbff589f06 to your computer and use it in GitHub Desktop.
Save someword/e461beef564a2ccf8e197ccbff589f06 to your computer and use it in GitHub Desktop.
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: node-drain
rules:
- apiGroups:
- extensions
resources:
- daemonsets
verbs:
- get
- list
- apiGroups:
- apps
resources:
- daemonsets
verbs:
- get
- list
- apiGroups:
- ""
resources:
- nodes
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- nodes/status
verbs:
- patch
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: node-drain
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: node-drain
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: node-drain
@someword
Copy link
Author

someword commented Oct 18, 2018

Update config map like

mapRoles: |
- rolearn: {{.NodeRoleArn}}
username: system:node:{{{{EC2PrivateDNSName}}}}
groups:
- system:bootstrappers
- system:nodes
- node-drain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment