`
gaojingsong
  • 浏览: 1152809 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
文章分类
社区版块
存档分类
最新评论

【K8s环境之minikube 安装】

 
阅读更多

Mac OSX

curl -Lo minikube http://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/releases/v1.1.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/

 

Linux

curl -Lo minikube http://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/releases/v1.1.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/

Windows

下载 minikube-windows-amd64.exe 文件,并重命名为 minikube.exe

 

自己构建

也可以从Github上获取相应的项目自行构建。

注:需要本地已经安装配置好 Golang 开发环境和Docker引擎

 

git clone https://github.com/AliyunContainerService/minikube

cd minikube

git checkout aliyun-v1.1.0

make

sudo cp out/minikube /usr/local/bin/

 

 

[root@localhost ~]# curl -Lo minikube http://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/releases/v1.1.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

100 39.7M  100 39.7M    0     0  6350k      0  0:00:06  0:00:06 --:--:-- 6748k

[root@localhost ~]# ls

anaconda-ks.cfg

[root@localhost ~]# git clone https://github.com/AliyunContainerService/minikube

Cloning into 'minikube'...

remote: Enumerating objects: 78565, done.

remote: Total 78565 (delta 0), reused 0 (delta 0), pack-reused 78565

Receiving objects: 100% (78565/78565), 58.42 MiB | 3.53 MiB/s, done.

Resolving deltas: 100% (47757/47757), done.

[root@localhost ~]# minikub

-bash: minikub: command not found

[root@localhost ~]# minikube 

Minikube is a CLI tool that provisions and manages single-node Kubernetes clusters optimized for development workflows.

 

Usage:

  minikube [command]

 

Available Commands:

  addons         Modify minikube's kubernetes addons

  cache          Add or delete an image from the local cache.

  completion     Outputs minikube shell completion for the given shell (bash or zsh)

  config         Modify minikube config

  dashboard      Access the kubernetes dashboard running within the minikube cluster

  delete         Deletes a local kubernetes cluster

  docker-env     Sets up docker env variables; similar to '$(docker-machine env)'

  help           Help about any command

  ip             Retrieves the IP address of the running cluster

  kubectl        Run kubectl

  logs           Gets the logs of the running instance, used for debugging minikube, not user code

  mount          Mounts the specified directory into minikube

  profile        Profile sets the current minikube profile

  service        Gets the kubernetes URL(s) for the specified service in your local cluster

  ssh            Log into or run a command on a machine with SSH; similar to 'docker-machine ssh'

  ssh-key        Retrieve the ssh identity key path of the specified cluster

  start          Starts a local kubernetes cluster

  status         Gets the status of a local kubernetes cluster

  stop           Stops a running local kubernetes cluster

  tunnel         tunnel makes services of type LoadBalancer accessible on localhost

  update-check   Print current and latest version number

  update-context Verify the IP address of the running cluster in kubeconfig.

  version        Print the version of minikube

 

Flags:

      --alsologtostderr                  log to standard error as well as files

  -b, --bootstrapper string              The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm")

  -h, --help                             help for minikube

      --log_backtrace_at traceLocation   when logging hits line file:N, emit a stack trace (default :0)

      --log_dir string                   If non-empty, write log files in this directory

      --logtostderr                      log to standard error instead of files

  -p, --profile string                   The name of the minikube VM being used.  

                                                This can be modified to allow for multiple minikube instances to be run independently (default "minikube")

      --stderrthreshold severity         logs at or above this threshold go to stderr (default 2)

  -v, --v Level                          log level for V logs

      --vmodule moduleSpec               comma-separated list of pattern=N settings for file-filtered logging

 

Use "minikube [command] --help" for more information about a command.

[root@localhost ~]# 

 

0
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics