Advanced Search
Search Results
34 total results found
安装kubuadm
添加 k8s 软件仓库 cat <<EOF | tee /etc/yum.repos.d/kubernetes.repo [kubernetes] name=Kubernetes baseurl=https://pkgs.k8s.io/core:/stable:/v1.30/rpm/ enabled=1 gpgcheck=1 gpgkey=https://pkgs.k8s.io/core:/stable:/v1.30/rpm/repodata/repomd.xml.key exclude=kubelet kubea...
基础环境部署
k8s 集群 ip 规划 master1: 172.16.40.110/24 node1: 172.16.40.120/24 设置主机名 master hostnamectl set-hostname master 设置主机名 node hostnamectl set-hostname node 配置 主机名 解析 echo "172.16.40.110 master" >> /etc/hosts echo "172.16.40.120 node" >> /etc/hosts 关闭防火墙 system...
使用 kubeadm 初始化集群
上传镜像到 /data/k8s_images ctr 导入镜像 cd /data/k8s_images ctr -n k8s.io i import coredns-v1.11.1.tar.gz ctr -n k8s.io i import kube-apiserver-v1.30.3.tar.gz ctr -n k8s.io i import kube-proxy-v1.30.3.tar.gz ctr -n k8s.io i import pause-3.9.tar.gz ctr -n k8s.io i impo...
安装 containerd 容器运行时
加载内核模块 modprobe br_netfilter modprobe overlay 开机自动加载内裤模块 cat > /etc/modules-load.d/k8s.conf << EOF overlay br_netfilter EOF 修改内核参数,启用 IPv4 数据包转发 cat > /etc/sysctl.d/k8s.conf << EOF net.ipv4.ip_forward = 1 net.bridge.bridge-nf-call-iptables = 1 net.bridge.bri...
二进制部署 Prometheus
下载 Prometheus https://prometheus.io/download/ 安装 Prometheus tar xvfz prometheus-3.8.1.linux-amd64.tar.gz cd prometheus-3.8.1.linux-amd64 Prometheus 采集自身健康状态 prometheus.yml # my global config global: scrape_interval: 15s # Set the scrape interval to every 15...
安装 Grafana
安装 Grafana wget https://dl.grafana.com/oss/release/grafana-11.1.3.linux-amd64.tar.gz tar -zxvf grafana-11.1.3.linux-amd64.tar.gz 创建证书 openssl genrsa -out /etc/grafana/grafana.key 4096 openssl req -new -key /etc/grafana/grafana.key -out /etc/grafana/grafana.cs...
二进制部署 pgsql 数据库
部署 PostgreSQL 数据库 下载 PostgreSQL https://www.postgresql.org/download/ 编译安装 PostgreSQL tar -xzf postgresql-XX.X.X.tar.gz cd postgresql-XX.X.X #安装依赖 #apt install build-essential libreadline-dev zlib1g-dev ./configure --prefix=/usr/local/pgsql make && make insta...
Node-Exporter
安装 node-exporter tar xvfz node_exporter-1.8.2.linux-amd64.tar.gz cd node_exporter-1.8.2.linux-amd64 ./node_exporter Bcrypt 加密 gin 用户密码 apt install apache2-utils -y htpasswd -nB gin 编辑 Web-config.yml 配置文件 tls_server_config: cert_file: <filename> key_file...
安装kubectl
下载 Kubernetes URL: https://kubernetes.io/releases/download/ 获取镜像列表 curl -Ls "https://sbom.k8s.io/$(curl -Ls https://dl.k8s.io/release/stable.txt)/release" | grep "SPDXID: SPDXRef-Package-registry.k8s.io" | grep -v sha256 | cut -d- -f3- | sed 's/-/\//' | sed...
部署 calico 组件
下载 calico 资源清单 安装文档: https://docs.tigera.io/calico/latest/getting-started/kubernetes/quickstart 资源清单: https://raw.githubusercontent.com/projectcalico/calico/v3.28.1/manifests/tigera-operator.yaml https://raw.githubusercontent.com/projectcalico/calico/v...
ubuntu22部署magento2
配置apt更新源/etc/apt/source.list deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/...
部署k8s集群
节点规划: master 10.1.1.101/24 8c8g node1 10.1.1.102/24 2c4g node2 10.1.1.103/24 2c4g gw: 10.1.1.2 dns: 223.5.5.5 禁用swap分区、修改hosts、启用 br_netfilterip_forward cat <<EOF >/etc/sysctl.d/k8s.conf net.bridge.bridge-nf-call-iptables = 1 net.bridge.bridge-nf-call-ip6tabl...
安装Calico、helm、istio-base、istiod、gateway
安装Calico(修改cidr相同于pods-cidr) kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.31.2/manifests/tigera-operator.yaml kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.31.2/manifests/custom-resources.yaml 部署he...
部署bookinfo测试案例
部署bookinfo测试 kubectl create namespace bookinfo kubectl label namespace bookinfo istio-injection=enabled 使用 Deployment 部署 details 应用。details_deploy.yaml apiVersion: apps/v1 kind: Deployment metadata: name: details-v1 labels: app: details version: v...
部署可观测平台
拉取Istio官方仓库 git clone https://github.com/istio/istio.git kubectl apply -f samples/addons 通过 Gateway 访问 Kiali kiali_gateway.yaml apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata: name: kiali-gateway spec: selector: istio: ...
实现金丝雀发布
金丝雀发布 给书店微服务的四个应用都创建一个 DestinationRule 。 service_version.yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: productpage spec: host: productpage subsets: - name: v1 labels: version: v1 --- apiVersion: networkin...