1.腾讯轻服务器K3S环境配置

本文详细介绍了在腾讯轻服务器上安装K3S系统的过程,包括获取token、配置防火墙、SSH连接,以及使用Kubernetes Dashboard部署服务和管理节点。重点展示了K3S的节点信息、Kubernetes控制面板操作和nerdctl的安装与路径调整问题。

1.腾讯轻服务器K3S系统安装

前端时间买了三年腾讯轻服务器,现在准备学习下K8S,但是服务器资源少,退而求其次的使用腾讯轻服务器默认的K3S系统。

1.获取按照提示,获取token ,

2.防火墙开启9090端口, 输入url:http://公网IP:9090登录;

3.开启SSH远程连接:创建密钥,默认下载文件,windows本地重命名增加后缀.pub,CRT通过公钥进行SSH登录。

2.Kubernetes-dashboard

 输入url:http://公网IP:9090,可以看到相关菜单

点击右上角“+”,可以创建yaml文件进行服务部署

  3.后台查看K3S相关信息

[root@VM-16-5-centos ~]# hostnamectl
   Static hostname: VM-16-5-centos
         Icon name: computer-vm
           Chassis: vm
        Machine ID: e811d69a833e41beaa003c0e69319e90
           Boot ID: 5816742493464737aa77fb84af907b88
    Virtualization: kvm
  Operating System: CentOS Linux 8 (Core)
       CPE OS Name: cpe:/o:centos:centos:8
            Kernel: Linux 4.18.0-305.3.1.el8.x86_64
      Architecture: x86-64
[root@VM-16-5-centos ~]# cat /etc/redhat-release
CentOS Linux release 8.2.2004 (Core) 
[root@VM-16-5-centos ~]# uname -a 
Linux VM-16-5-centos 4.18.0-305.3.1.el8.x86_64 #1 SMP Tue Jun 1 16:14:33 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
[root@VM-16-5-centos ~]# kubectl cluster-info
Kubernetes control plane is running at https://127.0.0.1:6443
CoreDNS is running at https://127.0.0.1:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
Metrics-server is running at https://127.0.0.1:6443/api/v1/namespaces/kube-system/services/https:metrics-server:/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
[root@VM-16-5-centos ~]# kubectl get nodes -o wide
NAME             STATUS   ROLES                  AGE   VERSION        INTERNAL-IP   EXTERNAL-IP   OS-IMAGE                KERNEL-VERSION              CONTAINER-RUNTIME
vm-16-5-centos   Ready    control-plane,master   69m   v1.20.7+k3s1   10.0.16.5     <none>        CentOS Linux 8 (Core)   4.18.0-305.3.1.el8.x86_64   containerd://1.4.4-k3s1
[root@VM-16-5-centos ~]# kubectl describe node
Name:               vm-16-5-centos
Roles:              control-plane,master
Labels:             beta.kubernetes.io/arch=amd64
                    beta.kubernetes.io/instance-type=k3s
                    beta.kubernetes.io/os=linux
                    k3s.io/hostname=vm-16-5-centos
                    k3s.io/internal-ip=10.0.16.5
                    kubernetes.io/arch=amd64
                    kubernetes.io/hostname=vm-16-5-centos
                    kubernetes.io/os=linux
                    node-role.kubernetes.io/control-plane=true
                    node-role.kubernetes.io/master=true
                    node.kubernetes.io/instance-type=k3s
Annotations:        flannel.alpha.coreos.com/backend-data: {"VtepMAC":"22:6c:c1:03:83:80"}
                    flannel.alpha.coreos.com/backend-type: vxlan
                    flannel.alpha.coreos.com/kube-subnet-manager: true
                    flannel.alpha.coreos.com/public-ip: 10.0.16.5
                    k3s.io/node-args: ["server","--write-kubeconfig-mode","644"]
                    k3s.io/node-config-hash: XAEWDMOLOUU74BDTBD2U3FVK7PQCFJ4XWLHQCWRAJLPPNWOIBJEA====
                    k3s.io/node-env: {"K3S_DATA_DIR":"/var/lib/rancher/k3s/data/474b7b031f3885345db99df7da66f11d537c75180eb6961b6cf2ec25b92efe65"}
                    node.alpha.kubernetes.io/ttl: 0
                    volumes.kubernetes.io/controller-managed-attach-detach: true
CreationTimestamp:  Fri, 06 May 2022 14:41:53 +080
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

测试老吴

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值