InfoHeap
Tech
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search
  • Home
  • > Kubernetes

Mac – enable and use kubernetes in docker

on Dec 30, 2022

Mac Docker comes with kubernetes embedded which can be enabled. Here the steps to enable and use kubernetes:

  1. Click on settings icons in Docker desktop, select Kubernetes menu item and select “Enable Kubernetes” and “Show system containers”. Then click apply and restart.
  2. This will also install kubectl in /user/local/
    $ ls -l /usr/local/bin/kubectl
    lrwxr-xr-x  1 root  wheel  55 Dec 11 20:22 /usr/local/bin/kubectl -> /Applications/Docker.app/Contents/Resources/bin/kubectl
  3. Install kubernetes dashboard
    kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml
  4. Create service account by creating dashboard-adminuser.yaml with following content
    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRoleBinding
    metadata:
      name: admin-user
    roleRef:
      apiGroup: rbac.authorization.k8s.io
      kind: ClusterRole
      name: cluster-admin
    subjects:
    - kind: ServiceAccount
      name: admin-user
      namespace: kubernetes-dashboard

    And then run
    kubectl apply -f dashboard-adminuser.yaml
  5. Create token
    kubectl -n kubernetes-dashboard create token admin-user --duration=36000s
  6. Start proxy
    kubectl proxy
  7. View dashboard on the url http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/
  8. Enter the token created above and click on sign in

Suggested posts:

  1. Mac m1 – How to Install Kubernetes with kind
  2. Mac command line convert svg to png
  3. Linux – find top directories by used disk size (excluding size of subdirectories)
  4. Mac docker – create getting-started image and run container using it
  5. Mac m1 – How to Install Kubernetes with minikube
  6. Mac – find which process is listening on a port
  7. Linux – how to remove user from a group
  8. Mac podman quick start guide
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Kubernetes, Mac Docker
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | Company results | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries | InfoHeap Money

Copyright © 2025 InfoHeap.

Powered by WordPress