apiVersion: apps/v1 kind: Deployment metadata: name: kubernetes-dashboard namespace: kubernetes-dashboard spec: replicas: 1 selector: matchLabels: k8s-app: kubernetes-dashboard template: metadata: labels: k8s-app: kubernetes-dashboard spec: serviceAccountName: dashboard-admin containers: - name: kubernetes-dashboard image: kubernetesui/dashboard:v2.7.0 imagePullPolicy: IfNotPresent args: - --auto-generate-certificates ports: - containerPort: 8443 livenessProbe: httpGet: path: / port: 8443 scheme: HTTPS initialDelaySeconds: 30 timeoutSeconds: 30 securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: 1001 volumeMounts: - mountPath: /tmp name: tmp-volume volumes: - name: tmp-volume emptyDir: {}