<p>I can create a rolebinding like this</p>
<pre><code>kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: test
  namespace: rolebinding-ns
subjects:
  - kind: ServiceAccount
    name: default
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: view
</code></pre>
<p>The subject defines a ServiceAccount without the namespace, and we have a &quot;default&quot; serviceaccount in this rolebinding-ns namespace but we have some other &quot;default&quot; serviceaccounts in other namespaces, included the system namespaces, are different serviceaccounts but with the same name</p>
<p>The question is. Which serviceaccount is used in this rolebinding? The one that is in the same namespace as the rolebinding or kube-system one or any other?</p>
<p>I just applied the yml of the rolebinding without error but I do not know which serviceaccount is being used.</p>

Roberto
<p>There's <strong>no</strong> namespace specified for the service account in your question:</p>
<pre><code>kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: test
  namespace: rolebinding-ns
subjects:
  - kind: ServiceAccount
    name: default
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: view
</code></pre>
<p><code>Which serviceaccount is used in this rolebinding? The one that is in the same namespace as the rolebinding or kube-system one or any other?</code></p>
<p>RoleBinding is a namespaced object, therefore in this case the one that is in the same namespace as the rolebinding and <strong>no</strong> other.</p>
