Giter Club home page Giter Club logo

k8s-docker-for-mac's Introduction

Enable Kubernetes on Docker for Mac in China

NOTE: It is tested on Docker for Mac 18.04

Install

  1. Install Docker for Mac or Windows

  2. Config registry mirror for Docker daemon with https://registry.docker-cn.com

mirror

  1. Preload Kubernetes images form Alibaba Cloud Registry Service, NOTE: you can modify the images.properties for your own images
$ ./load_images.sh
  1. Enable Kubernetes in Docker for Mac, and wait a while for Kubernetes is running

k8s

  1. Optional: switch the context to docker-for-desktop
$ kubectl config use-context docker-for-desktop
  1. Verify Kubernetes installation
$ kubectl cluster-info
$ kubectl get nodes
  1. Deploy Kubernetes dashboard
$ kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml

# creates proxy server
$ kubectl proxy

# access dashboard at:
http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/.
# use homebrew
$ brew install kubernetes-helm

# initialize the local CLI and also install Tiller into your Kubernetes cluster
$ helm init

# update charts repo
$ helm repo update

# install mysql chart
$ helm install --name my-mysql stable/mysql

# delete
$ helm delete my-mysql

# remove the release from the store and make its name free for later use
$ helm delete --purge my-mysql

Useful

  • show pods in the kube-system namespace.
$ kubectl get pods --namespace kube-system

# list images only
$ kubectl get pods --namespace kube-system -o jsonpath="{..image}"

Reference

k8s-docker-for-mac's People

Contributors

maguowei avatar denverdino avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.