apiVersion: v1 kind: ServiceAccount metadata: name: virtvnc namespace: kubevirt --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: virtvnc subjects: - kind: ServiceAccount name: virtvnc namespace: kubevirt roleRef: kind: ClusterRole name: virtvnc apiGroup: rbac.authorization.k8s.io --- kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: virtvnc rules: - apiGroups: - subresources.kubevirt.io resources: - virtualmachineinstances/console - virtualmachineinstances/vnc verbs: - get - apiGroups: - kubevirt.io resources: - virtualmachines - virtualmachineinstances - virtualmachineinstancepresets - virtualmachineinstancereplicasets - virtualmachineinstancemigrations verbs: - get - list - watch --- apiVersion: v1 kind: Service metadata: labels: app: virtvnc name: virtvnc namespace: kubevirt spec: ports: - port: 8001 protocol: TCP targetPort: 8001 selector: app: virtvnc type: NodePort --- apiVersion: apps/v1 kind: Deployment metadata: name: virtvnc namespace: kubevirt spec: replicas: 1 selector: matchLabels: app: virtvnc template: metadata: labels: app: virtvnc spec: serviceAccountName: virtvnc nodeSelector: node-role.kubernetes.io/master: '' tolerations: - key: "node-role.kubernetes.io/master" operator: "Equal" value: "" effect: "NoSchedule" containers: - name: virtvnc image: quay.io/samblade/virtvnc:v0.1 livenessProbe: httpGet: port: 8001 path: / scheme: HTTP failureThreshold: 30 initialDelaySeconds: 30 periodSeconds: 10 successThreshold: 1 timeoutSeconds: 5