当前位置: 首页 > news >正文

Talos-docker版本中创建 Kubernetes 集群

在talos容器化版本中部署Kubernetes集群,用于折腾学习。

1.系统信息

虚拟机软件:VMware Worktation

虚拟机配置:4G内存 4vCPU  200GB磁盘

操作系统:CentOS7.9

docker:20.10.15

PS:为啥VMware Worktation,问就是因为穷,没有服务器;为啥CentOS7.9,之前部署的CentOS虚拟机+docker环境,直接使用了。Talos官网上对docker的版本有要求:

安装talosctl

curl -Lo /usr/local/bin/talosctl https://github.com/siderolabs/talos/releases/download/v1.0.4/talosctl-$(uname -s | tr "[:upper:]" "[:lower:]")-amd64

chmod +x /usr/local/bin/talosctl

[root@localhost ~]# talosctl 
A CLI for out-of-band management of Kubernetes nodes created by Talos

Usage:
  talosctl [command]

Available Commands:
  apply-config        Apply a new configuration to a node
  bootstrap           Bootstrap the etcd cluster on the specified node.
  cluster             A collection of commands for managing local docker-based or QEMU-based clusters
  completion          Output shell completion code for the specified shell (bash, fish or zsh)
  config              Manage the client configuration file (talosconfig)
  conformance         Run conformance tests
  containers          List containers
  copy                Copy data out from the node
  dashboard           Cluster dashboard with real-time metrics
  disks               Get the list of disks from /sys/block on the machine
  dmesg               Retrieve kernel logs
  edit                Edit a resource from the default editor.
  etcd                Manage etcd
  events              Stream runtime events
  gen                 Generate CAs, certificates, and private keys
  get                 Get a specific resource or list of resources.
  health              Check cluster health
  help                Help about any command
  images              List the default images used by Talos
  inspect             Inspect internals of Talos
  kubeconfig          Download the admin kubeconfig from the node
  list                Retrieve a directory listing
  logs                Retrieve logs for a service
  memory              Show memory usage
  mounts              List mounts
  patch               Update field(s) of a resource using a JSON patch.
  processes           List running processes
  read                Read a file on the machine
  reboot              Reboot a node
  reset               Reset a node
  restart             Restart a process
  rollback            Rollback a node to the previous installation
  service             Retrieve the state of a service (or all services), control service state
  shutdown            Shutdown a node
  stats               Get container stats
  support             Dump debug information about the cluster
  time                Gets current server time
  upgrade             Upgrade Talos on the target node
  upgrade-k8s         Upgrade Kubernetes control plane in the Talos cluster.
  usage               Retrieve a disk usage
  validate            Validate config
  version             Prints the version

Flags:
      --context string       Context to be used in command
  -e, --endpoints strings    override default endpoints in Talos configuration
  -h, --help                 help for talosctl
  -n, --nodes strings        target the specified nodes
      --talosconfig string   The path to the Talos configuration file (default "/root/.talos/config")

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

2.创建集群Kubernetes

2.1安装kubectl

# 下载kubectl
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"

# 下载kubectl校验文件
curl -LO "https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl.sha256"

# 校验文件
echo "$(cat kubectl.sha256)  kubectl" | sha256sum --check

# 安装
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

  

在 Linux 系统中安装并设置 kubectl | Kubernetes

2.2 创建Kubernetes集群

talosctl cluster create --wait

# 或者
talosctl cluster create

 报错(未解决)

3.

4.集群清除

talosctl cluster destroy

Talos官方网站:Talos Linux

相关文章:

  • 【VSCode的安装与配置】
  • 卷积神经网络 - ResNet(残差网络)
  • Maven 的下载与安装
  • 嵌入式学习第二十八天--顺序栈
  • apache连接池机制讨论
  • C#:类型定义中使用‌问号(?)
  • Git 提示 “LF will be replaced by CRLF“ 的原因及解决方案
  • 【安全】记录钓鱼邮件中木马病毒的分析溯源
  • WPF 附加属性
  • MySQL锁等待超时问题的排查与解决
  • Python 爬虫:一键解锁 3GPP 标准协议下载难题
  • 基于Netlify + Localtunnel 实现本地项目“无服务器”部署上线
  • 资产管理存储技术栈的二十年演进:从大数据存储到AI驱动的智能管理
  • LeetCode 235. 二叉搜索树的最近公共祖先 java题解
  • 练习:猜数字小游戏
  • SRT协议
  • 企业微信token及相关接口关联分析
  • 界面控件Telerik和Kendo UI 2025 Q1亮点——AI集成与数据可视化
  • leetcode543.二叉树的直径
  • 【系统架构设计师】数据库系统 ② ( 分布式数据库 | 分布式数据库 特点 | 分布式数据库 分层模式 | 两阶段提交协议 - 2PC 协议 )
  • 中央气象台台风网台风实时路径/外贸seo推广公司
  • 网站工具查询/快速提升网站排名
  • 青岛黄岛区做网站设计的/软文营销范文100字
  • 营销型 网站开发/网络营销费用预算
  • 网站无内容 备案/网络营销的八大能力
  • 成全视频免费观看在线看小说原著叫什么/何鹏seo