debian12基础环境配置
- 0
#讨论区
00条评论
实时对话
loading...
shell
shell
shell
shell
shell
shell
https://helm.sh/docs/intro/install/
shell
先让traefik可以代理https流量
/var/lib/rancher/k3s/server/manifests/traefik-config.yaml
yaml
https://github.com/kubernetes/dashboard
bash
Add kubernetes-dashboard repository
shell
Deploy a Helm Release named "kubernetes-dashboard" using the kubernetes-dashboard chart
shell
bash
获取token
shell
shell
shell
观察启动成功
shell
配置 UI访问 https://git.ooxo.cc/sonic/yaml/raw/branch/main/longhorn.yaml
ip addr
ssh chen@192.168.100.204
su root
echo "pub key" >> ~/.ssh/authorized_keys
//更新软件包列表
apt update
//安装实际的软件包更新
apt upgrade
apt install curl -y
curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" K3S_NODE_NAME="k8s-master-01" sh -s -
[INFO] Finding release for channel stable
[INFO] Using v1.28.7+k3s1 as release
[INFO] Downloading hash https://github.com/k3s-io/k3s/releases/download/v1.28.7+k3s1/sha256sum-amd64.txt
[INFO] Downloading binary https://github.com/k3s-io/k3s/releases/download/v1.28.7+k3s1/k3s
[INFO] Verifying binary download
[INFO] Installing k3s to /usr/local/bin/k3s
[INFO] Skipping installation of SELinux RPM
[INFO] Creating /usr/local/bin/kubectl symlink to k3s
[INFO] Creating /usr/local/bin/crictl symlink to k3s
[INFO] Creating /usr/local/bin/ctr symlink to k3s
[INFO] Creating killall script /usr/local/bin/k3s-killall.sh
[INFO] Creating uninstall script /usr/local/bin/k3s-uninstall.sh
[INFO] env: Creating environment file /etc/systemd/system/k3s.service.env
[INFO] systemd: Creating service file /etc/systemd/system/k3s.service
[INFO] systemd: Enabling k3s unit
Created symlink /etc/systemd/system/multi-user.target.wants/k3s.service → /etc/systemd/system/k3s.service.
[INFO] Host iptables-save/iptables-restore tools not found
[INFO] Host ip6tables-save/ip6tables-restore tools not found
[INFO] systemd: Starting k3s
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
name: traefik
namespace: kube-system
spec:
valuesContent: |-
globalArguments:
- "--serversTransport.insecureSkipVerify=true"
ports:
psql:
port: 5432
expose: true
exposedPort: 5432
protocol: TCP
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
helm upgrade --install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard --create-namespace --namespace kubernetes-dashboard
kubectl apply -f https://git.ooxo.cc/sonic/k8s/raw/branch/main/kubernetes-dashboard.yaml
kubectl get secret admin-user -n kubernetes-dashboard -o jsonpath={".data.token"} | base64 -d
apt install open-iscsi -y
kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/v1.6.0/deploy/longhorn.yaml
https://longhorn.io/docs/1.6.0/deploy/install/install-with-kubectl/