minikube安装

本文详细描述了如何在Linux系统上安装Minikube,包括设置Docker源、安装步骤、内存调整以及使用阿里云镜像加速。最终成功启动并配置了Kubernetes集群和kubelet工具。
摘要由CSDN通过智能技术生成

minikube也是需要docker环境的,首先看一下docker

 下载docker.repo源到本地

 通过repo里面查找最新的docker

 开始安装docker

 修改docker 下载加速地址, systemctl deamon-reload

下载minikube 

minikube start | minikube

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube

 

初始化的时候还是卡主了

root@k8s-test ~]# minikube start    --driver=docker  --force  image-mirror=registry.cn-hangzhou.aliyuncs.com/google_containers 
* minikube v1.31.2 on Anolis 8.4
! minikube skips various validations when --force is supplied; this may lead to unexpected behavior
* Using the docker driver based on existing profile
* The "docker" driver should not be used with root privileges. If you wish to continue as root, use --force.
* If you are running minikube within a VM, consider using --driver=none:
*   https://minikube.sigs.k8s.io/docs/reference/drivers/none/
* Tip: To remove this root owned cluster, run: sudo minikube delete

X The requested memory allocation of 2200MiB does not leave room for system overhead (total system memory: 2798MiB). You may face stability issues.
* Suggestion: Start minikube with less memory allocated: 'minikube start --memory=2200mb'

* Starting control plane node minikube in cluster minikube
* Pulling base image ...
* Restarting existing docker container for "minikube" ...
* Preparing Kubernetes v1.27.4 on Docker 24.0.4 ...
* Configuring bridge CNI (Container Networking Interface) ...
* Verifying Kubernetes components...
  - Using image gcr.io/k8s-minikube/storage-provisioner:v5
* Enabled addons: default-storageclass, storage-provisioner
* kubectl not found. If you need it, try: 'minikube kubectl -- get pods -A'
* Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
[root@k8s-test ~]# minikube  kubcetl --  get  pods -A

嫌慢的话带阿里的地址

[root@k8s-test ~]# minikube  kubectl --  get  pods -A
NAMESPACE     NAME                               READY   STATUS    RESTARTS       AGE
kube-system   coredns-5d78c9869d-krtnx           1/1     Running   1 (2m7s ago)   22h
kube-system   etcd-minikube                      1/1     Running   1 (2m7s ago)   22h
kube-system   kube-apiserver-minikube            1/1     Running   1 (2m7s ago)   22h
kube-system   kube-controller-manager-minikube   1/1     Running   1 (2m7s ago)   22h
kube-system   kube-proxy-rtl58                   1/1     Running   1 (2m7s ago)   22h
kube-system   kube-scheduler-minikube            1/1     Running   1 (2m7s ago)   22h
kube-system   storage-provisioner                1/1     Running   3 (73s ago)    22h

这样就起来了

[root@k8s-test ~]# alias kubectl="minikube kubectl --"
 不用每次都minikube了 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值