[root@localhost ~]# lsmod |grep kvm
kvm_intel 55496 32
kvm 337772 1 kvm_intel
添加 repo配置文件,/pos.po
[virtualbox]
name=Oracle Linux / RHEL / CentOS-$releasever / $basearch - VirtualBox
baseurl=/$releasever/$basearch
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=.asc
运行
yum install -y VirtualBox-6.0
添加 repo配置文件,/pos.po
[kubernetes]
name=Kubernetes
baseurl=
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=.gpg .gpg
运行:
yum install -y kubectl
若出现以下错误
Loaded plugins: fastestmirror, langpacks
Existing lock /var/run/yum.pid: another copy is running as pid 13332.
Another app is currently holding the yum lock; waiting for it The other application is: PackageKitMemory : 92 M RSS (505 MB VSZ)
运行:
rm -f /var/run/yum.pid,
重新 yum install -y kubectl
curl -LO #install 会自动添加可执行属性install minikube-linux-amd64 /usr/local/bin/minikube
如果出现以下错误
-bash: /usr/local/bin/minikube: cannot execute binary file
有可能是可执行文件没有完全下载下来所致
minikube start
如果出现以下错误
- Pulling images required by Kubernetes v1.14.0 ...
X Unable to pull images, which may be OK: running cmd: sudo kubeadm config images pull --config /var/lib/kubeadm.yaml: command failed: sudo kubeadm config images pull --config /var/lib/kubeadm.yaml
stdout:
stderr: failed to pull image io/kube-apiserver:v1.14.0": output: Error response from daemon: Get /: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
, error: exit status 1
: Process exited with status 1
则需要设置HTTP 代理
export HTTP_PROXY=xxx:{port}
export HTTPS_PROXY=xxx:{port}
如果出现以下错误
: Waiting for pods: apiserver
! Error starting cluster: wait: waiting for component=kube-apiserver: timed out waiting for the condition* Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
-
X Problems detected in "kube-addon-manager":- error: no objects passed to apply- error: no objects passed to apply- error: no objects passed to apply
则需要设置NO_PROXY
export NO_PROXY=localhost,127.0.0.1,10.96.0.0/12,192.168.99.0/24,192.168.39.0/24
所以, minikube 综合启动命令为
minikube start --docker-env=HTTP_PROXY=$HTTP_PROXY --docker-env HTTPS_PROXY=$HTTPS_PROXY --docker-env NO_PROXY=$NO_PROXY
正确的response
o minikube v1.0.0 on linux (amd64)
$ Downloading Kubernetes v1.14.0 images in the background ...
i Tip: Use 'minikube start -p <name>' to create a new cluster, or 'minikube delete' to delete this one.
: Re-using the currently running virtualbox VM for "minikube" ...
: Waiting for SSH access ...
- "minikube" IP address is 192.168.99.102
o Found network options:- HTTP_PROXY=:913- HTTPS_PROXY=:913- NO_PROXY=localhost,127.0.0.1,10.96.0.0/12,192.168.99.0/24,192.168.39.0/24
- Configuring Docker as the container runtime ...- env HTTP_PROXY=:913- env HTTPS_PROXY=:913- env NO_PROXY=localhost,127.0.0.1,10.96.0.0/12,192.168.99.0/24,192.168.39.0/24
- Version of container runtime is 18.06.2-ce
: Waiting for image downloads to complete ...
- Preparing Kubernetes environment ...
- Pulling images required by Kubernetes v1.14.0 ...
: Relaunching Kubernetes v1.14.0 using kubeadm ...
: Waiting for pods: apiserver proxy etcd scheduler controller dns
: Updating kube-proxy configuration ...
- Verifying component health ......
+ kubectl is now configured to use "minikube"
= Done! Thank you for using minikube!
cmd : kubectl cluster-info
response:
Kubernetes master is running at 192.168.99.102:8443
KubeDNS is running at 192.168.99.102:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
kubectl get nodes
NAME STATUS ROLES AGE VERSION
minikube Ready master 2m46s v1.14.0
本文发布于:2024-01-29 04:32:13,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170647393612718.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |