Margrop
Articles158
Tags353
Categories21
1password AC AP API AppDaemon Aqara Cron Date Diagrams.net HA HADashboard HomeAssistant IP IPv4 Java LVM‑Thin Linux MacOS MySQL NAS PPPoE PostgreSQL ProcessOn Proxmox VE SSL Shell TTS TimeMachine UML Uptime Kuma Web Windows activate ad adb adblock agent aligenie aliyun alpine annotation aop authy autofs backup baidupan bash bitwarden boot brew browser caddy2 cdn centos cert certbot charles chat chrome classloader client clone closures cloudflare cmd command commit container crontab ctyun ddsm demo dependency deploy developer devtools dll dns docker domain download draw drawio dsm dump dylib edge exception export fail2ban feign firewall-cmd flow frp frpc frps fuckgfw function gcc gfw git github golang gperftools gridea grub gvt-g hacs havcs heap hello hexo hibernate hidpi hoisting homeassistant hosts html htmlparser https idea image img img2kvm import index install intel io ios ip iptables iptv ipv6 iso java javascript jetbrains jni jnilib jpa js json jsonb jupter jupyterlab jvm k8s kernel key kid kms kodi koolproxy koolproxyr kvm lan lastpass launchctl learning lede letsencrypt linux live low-code lvm lxc m3u8 mac macos mariadb markdown maven md5 microcode mirror modem modules monitor mount mstsc mysql n2n n5105 nas network nfs node node-red nodejs nohup notepad++ npm nssm ntp oop openfeign openssl os otp ovz packet capture pat pdf pem perf ping pip plugin png powerbutton print pro proxy pve pvekclean python qcow2 qemu qemu-guest-agent rar reboot reflog remote remote desktop renew repo resize retina root route router rule rules runtime safari sata scipy-notebook scoping scp server slmgr so socks source spk spring springboot springfox ssh ssl stash string supernode svg svn swagger sync synology systemctl tap tap-windows tapwindows telecom template terminal tls token totp tvbox txt ubuntu udisk ui undertow uninstall unlocker upgrade url v2ray vhd vim vlmcsd vm vmdk web websocket wechat windows with worker wow xiaoya xml yum zip 中国电信 云电脑 交换机 光猫 公网IP 内存 内网IP 升级 启动 夏令时 天猫精灵 天翼云 安装 容器 导入 小米 常用软件 广告屏蔽 序列号 应用市场 异常 抓包 描述文件 时区 显卡虚拟化 智能家居 智能音箱 梯子 模块 流程 流程图 浏览器 漫游 激活 火绒 电信 画图 直播源 续期 网关 网络风暴 群晖 腾讯 虚拟机 证书 路由 路由器 软件管家 软路由 运维监控 镜像 镜像源 门窗传感器 防火墙 阿里云 阿里源 集客

Hitokoto

Archive

使用 Minikube 安装最小化k8s环境

使用 Minikube 安装最小化k8s环境

在 Proxmox VE(一种基于 Debian 的虚拟化环境)上部署 Minikube 需要考虑 Proxmox 的特性,它本质上是一个虚拟机和容器管理平台。您将需要在 Proxmox VE 上创建一个虚拟机(VM),然后在该 VM 中安装 Minikube。以下是详细的步骤:

步骤 1: 创建并配置虚拟机

  1. 登录 Proxmox VE 管理界面

    • 通常通过 Web 浏览器访问 https://<Proxmox_IP>:8006
  2. 创建一个新的虚拟机

    • 在 Proxmox 的 “Create VM” 按钮中点击。
    • 为 VM 命名,选择安装类型为 “Linux”,版本根据您要安装的 Linux 发行版确定(推荐使用 Ubuntu 或 Debian)。
  3. 配置硬件

    • CPU: 至少分配 2 核心。
    • 内存: 至少分配 2GB RAM。
    • 硬盘: 至少 20GB 存储空间。
    • 网络: 确保 VM 可以访问互联网。
  4. 安装操作系统

    • 挂载 ISO 文件并通过 Proxmox 的控制台进行操作系统的安装。
    • 安装过程中设置必要的用户和网络配置。

步骤 2: 安装和配置 Minikube

  1. 连接到虚拟机

    • 使用 SSH 或通过 Proxmox 的控制台连接到新创建的 VM。
  2. 安装 kubectl

    • 在 VM 上安装 kubectl。对于 Ubuntu/Debian 系统,可以使用以下命令:
      1
      2
      3
      4
      curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
      chmod +x ./kubectl
      sudo mv ./kubectl /usr/local/bin/kubectl
      kubectl version --client
  3. 安装 Minikube

    • 下载并安装 Minikube。对于 Linux 系统,可以使用以下命令:
      1
      2
      3
      curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
      chmod +x minikube
      sudo install minikube /usr/local/bin/
  4. 启动 Minikube

    • 由于在 VM 中运行,推荐使用 Docker 作为驱动器。首先确保 Docker 已安装,并启动 Minikube:
      1
      minikube start --driver=docker
    • 这一步会自动拉取必要的 Minikube Docker 镜像并启动 Kubernetes 集群。
  5. 验证安装

    • 运行 kubectl get nodes 来检查集群状态,应该显示 minikube 节点处于 READY 状态。

步骤 3: 配置和使用 Kubernetes 集群

  • 通过 kubectl 命令与集群交互,部署应用程序或进行其他管理任务。
  • 如果需要访问集群内运行的应用程序,可以使用 Minikube 的 minikube service 命令来暴露服务。

通过上述步骤,您可以在 Proxmox VE 上成功部署和运行一个 Minikube Kubernetes 集群,为开发和测试环境提供一个相对隔离且资源可控的环境。

Author:Margrop
Link:http://blog.margrop.com/post/install-min-k8s-using-minikube-on-pve/
版权声明:本文采用 CC BY-NC-SA 3.0 CN 协议进行许可