win11使用minikube搭建K8S集群基于podman desktop( Fedora Linux 43)

文章目录

minikube搭建K8S集群基于Fedora Linux 43系统

win11安装podman desktop

bash 复制代码
# 静默 Windows 安装程序
podman-desktop-1.6.4-setup-x64.exe /S
# 或者 使用Chocolatey安装
choco install podman-desktop

安装minikube

bash 复制代码
curl -LO https://github.com/kubernetes/minikube/releases/latest/download/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
rm minikube-linux-amd64

minikube start

复制代码
minikube start -p minikube2 --driver=podman \
--container-runtime=cri-o \
--kubernetes-version='1.32'

查看集群

bash 复制代码
minikube -p minikube2 kubectl -- get pods -A

minikube profile list

minikube profile minikube2

minikube kubectl -- get pods -A

alias kubectl="minikube kubectl --"

kubectl get pods -A

停止集群 minikube stop

下次启动集群 minikube start


参考

配置别名

bash 复制代码
echo 'alias kubectl="minikube kubectl --"' >> ~/.bashrc
echo 'alias mini="minikube"' >> ~/.bashrc
source ~/.bashrc

安装nano

bash 复制代码
sudo dnf install nano

配置Fedora Linux加速

用以下命令替换 /etc/yum.repos.d 下的文件:

bash 复制代码
sudo sed -e 's|^metalink=|#metalink=|g' \
         -e 's|^#baseurl=http://download.example/pub/fedora/linux|baseurl=https://mirrors.ustc.edu.cn/fedora|g' \
         -i.bak \
         /etc/yum.repos.d/fedora.repo \
         /etc/yum.repos.d/fedora-updates.repo

最后运行 sudo dnf makecache 生成缓存。


配置podman镜像加速

wsl使用podman镜像加速

bash 复制代码
cat /etc/containers/registries.conf.d/custom.conf

sudo nano /etc/containers/registries.conf.d/custom.conf

添加以下内容

bash 复制代码
unqualified-search-registries = ['docker.io', 'k8s.gcr.io', 'gcr.io']

[[registry]]
prefix = "docker.io"
insecure = true
location = "registry-1.docker.io"

[[registry.mirror]]
location = "docker.1ms.run"

[[registry]]
prefix = "k8s.gcr.io"
insecure = true
location = "k8s.gcr.io"

[[registry.mirror]]
location = "registry.cn-hangzhou.aliyuncs.com/google_containers"

[[registry]]
prefix = "gcr.io"
insecure = true
location = "gcr.io"

[[registry.mirror]]
location = "registry.cn-hangzhou.aliyuncs.com/google_containers"

[[registry]]
prefix = "ghcr.io"
insecure = true
location = "ghcr.io"

[[registry.mirror]]
location = "registry.cn-hangzhou.aliyuncs.com/google_containers"

保存并退出:Ctrl + O → 回车 → Ctrl + X


查看系统版本

复制代码
$ cat /etc/fedora-release
Fedora release 43 (Forty Three)

设置root用户密码

bash 复制代码
sudo passwd root

切换用户

bash 复制代码
su user
cd /home/user
pwd

相关推荐
踩着两条虫7 小时前
如何评价VTJ.PRO?
前端·架构·ai编程
ShineWinsu8 小时前
对于Linux:动静态库的制作与原理的解析—下
linux·运维·服务器·进程·链接·虚拟地址空间·
RH2312119 小时前
2026.4.16Linux 管道
java·linux·服务器
带刺的坐椅9 小时前
SolonCode CLI 为什么选择 Java 技术栈?
ai编程·cli·claudecode·opencode·soloncode
冬奇Lab10 小时前
Android 开发要变天了:Google 专为 Agent 重建工具链,Token 减少 70%、速度提升 3 倍
android·人工智能·ai编程
handler0110 小时前
Linux: 基本指令知识点(2)
linux·服务器·c语言·c++·笔记·学习
liuyukuan10 小时前
如何在win11上打开 WSL2(Windows 的 Linux 子系统)?
linux·windows
bKYP953cL10 小时前
构建自己的AI编程助手:基于RAG的上下文感知实现方案
数据库·人工智能·ai编程
橙子也要努力变强10 小时前
Linux信号机制
linux·服务器·网络
shughui10 小时前
FinalShell / Xshell 完整教程(下载+安装+使用,2026最新版)
linux·fiddler·xshell·xftp·finalshell·远程连接工具