<p>I am a beginner with Kubernetes. I have enabled it from Docker Destop and now I want to install Kubernetes Dashboard.</p>
<p>I followed this link:</p>
<p><a href="https://github.com/kubernetes/dashboard#getting-started" rel="nofollow noreferrer">https://github.com/kubernetes/dashboard#getting-started</a></p>
<p>And I executed my first command in Powershell as an administrator:</p>
<pre><code>kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.4.0/aio/deploy/recommended.yaml
</code></pre>
<p>I get the following error:</p>
<blockquote>
<p>error: error validating
&quot;https://raw.githubusercontent.com/kubernetes/dashboard/v2.4.0/aio/deploy/recommended.yaml&quot;:
error validating data:
ValidationError(Deployment.spec.template.spec.securityContext):
unknown field &quot;seccompProfile&quot; in
io.k8s.api.core.v1.PodSecurityContext; if you choose to ignore these
errors, turn validation off with --validate=false</p>
</blockquote>
<p>In which case I tried to use the same command with --validate=false.</p>
<p>Then it went and gave no errors and when I execute :</p>
<pre><code>kubectl proxy
</code></pre>
<p>I got an access token using:</p>
<pre><code>kubectl describe secret -n kube-system   
</code></pre>
<p>and I try to access the link as provided in the guide :</p>
<p>http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/</p>
<p>I get the following swagger response:</p>
<p><a href="https://i.stack.imgur.com/Dw9DH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Dw9DH.png" alt="enter image description here" /></a></p>

<p>The error indicated that your cluster version is not compatible to use <code>seccompProfile.type: RuntimeDefault</code>. In this case you don't apply the dashboard spec (<a href="https://raw.githubusercontent.com/kubernetes/dashboard/v2.4.0/aio/deploy/recommended.yaml" rel="nofollow noreferrer">https://raw.githubusercontent.com/kubernetes/dashboard/v2.4.0/aio/deploy/recommended.yaml</a>) right away, you download and comment the following line in the spec:</p>
<pre><code>...
spec:
  # securityContext:
  #   seccompProfile:
  #     type: RuntimeDefault
...
</code></pre>
<p>Then you apply the updated spec <code>kubectl apply -f recommended.yaml</code>.</p>
