# service-account.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: sslsniffer-sa
  namespace: default
---
# cluster-role.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: sslsniffer-role
rules:
- apiGroups: [""]
  resources: ["pods", "pods/status", "pods/log", "nodes"]
  verbs: ["get", "list", "watch"]
- apiGroups: [""]
  resources: ["nodes"]
  verbs: ["get", "list", "watch"]
- apiGroups: [""]
  resources: ["services"]
  verbs: ["get", "list", "watch"]
- apiGroups: [""]
  resources: ["events"]
  verbs: ["get", "list", "watch"]
- apiGroups: ["apps"]
  resources: ["daemonsets", "deployments", "replicasets", "statefulsets"]
  verbs: ["get", "list", "watch"]
---
# role-binding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: sslsniffer-role-binding
  namespace: default
subjects:
- kind: ServiceAccount
  name: sslsniffer-sa
  namespace: default
roleRef:
  kind: ClusterRole
  name: sslsniffer-role
  apiGroup: rbac.authorization.k8s.io
