Created
January 29, 2019 10:20
-
-
Save ttousai/4ec3c856770c474a3ec9fd10bafc49d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: batch/v1 | |
kind: Job | |
metadata: | |
name: kube-bench-master | |
spec: | |
template: | |
spec: | |
hostPID: true | |
nodeSelector: | |
node-role.kubernetes.io/master: "" | |
tolerations: | |
- key: node-role.kubernetes.io/master | |
operator: Exists | |
effect: NoSchedule | |
containers: | |
- name: kube-bench | |
image: aquasec/kube-bench:latest | |
command: ["kube-bench","master", "-v2"] | |
volumeMounts: | |
- name: var-lib-etcd | |
mountPath: /var/lib/etcd | |
- name: etc-kubernetes | |
mountPath: /etc/kubernetes | |
# /usr/bin is mounted to access kubectl / kubelet, for auto-detecting the Kubernetes version. | |
# You can omit this mount if you specify --version as part of the command. | |
- name: usr-bin | |
mountPath: /usr/bin | |
restartPolicy: Never | |
volumes: | |
- name: var-lib-etcd | |
hostPath: | |
path: "/var/lib/etcd" | |
- name: etc-kubernetes | |
hostPath: | |
path: "/etc/kubernetes" | |
- name: usr-bin | |
hostPath: | |
path: "/usr/bin" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment