Linux安装NFS
1、创建共享目录和权限设置 [root@k8s-master ~]# mkdir -p /data/nfs [root@k8s-master ~]# chown -R 755 /data/nfs/ [root@k8s-master ~]# ll /data/ 2、通过yum进行安装 [root@k8s-master ~]#yum -y install nfs-utils rpcbind 3、配置 nfs,nfs 的默认配置文件在 /etc/exports 文件下,在该文件中添加下面的配置信息: [root@k8s-master ~]# vim /etc/exports /data/nfs *(rw,sync,no_root_squash) ####备注相关配置说明 /data/nfs:是共享的数据目录 *:表示任何人都有权限连接,当然也可...
k3s+kuboard快速搭建K8s生产环境集群
提前准备3台机器,可以是云服务器,安装机器要求,请参考:https://docs.k3s.io/zh/installation/requirements 我准备了: 192.168.2.195(master node) 192.168.2.226(agent node1) 192.168.2.227(agent node2) 在开始之前,我们先安装docker: #禁用防火墙 systemctl disable firewalld #禁用selinx setenforce 0 #安装所需的软件包。yum-utils 提供了 yum-config-manager ,并且 device mapper 存储驱动程序需要 device-mapper-persistent-data 和 lvm2。 sudo yum install ...
部署docker+k3s+rancher2
一、先安装docker curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun 二、安装rancher2 docker run -d --privileged --restart=unless-stopped -p 8080:80 -p 8443:443 -v /var/lib/rancher:/var/lib/rancher rancher/rancher:latest 访问dashboar: https://ip:8443 忽略证书错误 二、安装k3s curl -sfL https://docs.rancher.cn/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn INSTALL_K3S_EXEC="--docker" sh -
部署k3s+KubeSphere
前言 k3s是经CNCF一致性认证的Kubernetes发行版,专为物联网及边缘计算设计。 KubeSphere 是在 Kubernetes 之上构建的面向云原生应用的分布式操作系统,完全开源,支持多云与多集群管理,提供全栈的 IT 自动化运维能力,简化企业的 DevOps 工作流。它的架构可以非常方便地使第三方应用与云原生生态组件进行即插即用 (plug-and-play) 的集成。 作为全栈的多租户容器平台,KubeSphere 提供了运维友好的向导式操作界面,帮助企业快速构建一个强大和功能丰富的容器云平台。KubeSphere 为用户提供构建企业级 Kubernetes...
es+filebeat+elastalert2实现异常邮件提醒
以下安装都使用docker-compose,docker及K8s安装原理一样 ES安装: es: container_name: es image: docker.elastic.co/elasticsearch/elasticsearch:7.2.0 ports: - "9200:9200" environment: - node.name=es - http.host=0.0.0.0 - transport.host=127.0.0.1 - "ES_JAVA_OPTS=-Xms512m -Xmx512m" - bootstrap.memory_lock=true - discovery.type=single-node - xpack.security.enabled=true - xpack.security.http.ssl.enab...
centos7安装k8s集群(2022版)
安装docker yum install docker sudo systemctl start docker sudo systemctl enable docker docker version 安装k8s集群 3.1 关闭防火墙 systemctl stop firewalld systemctl disable firewalld 3.2 关闭selinux setenforce 0 # 临时关闭 sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config # 永久关闭 1.3.3 关闭swap swapoff -a # 临时关闭;关闭swap主要是为了性能考虑 free # 可以通过这个命令查看swap是否关闭了 sed -...
k8s之Service
kind: Service apiVersion: v1 metadata: name: mysql-svc namespace: default labels: name: mysql-svc spec: ports: - name: http protocol: TCP port: 3306 targetPort: 3306 nodePort: 33306 selector: name: mysql-pod type: NodePort
k8s之PersistentVolume&PersistentVolumeClaim
kind:PersistentVolume apiVersion: v1 metadata: name: mysql-pv spec: capacity: storage:1Gi hostPath: path:/home/work/share/mysql type:'' accessModes: -ReadWriteOnce claimRef: kind:PersistentVolumeClaim namespace:default name: mysql-pvc persistentVolumeReclaimPolicy:Retain volumeMode:Filesystem kind: PersistentVolumeClaim apiVersion: v1 metadata: name: mysql-pvc namespace: default labels: app: mysql-pvc spec: accessM...
k8s之ReplicationController
kind: ReplicationController apiVersion: v1 metadata: name: mysql-rc namespace: default uid: 946f2c6a-f7ac-4412-b3c9-3741fe668717 resourceVersion: '1299573' generation: 3 creationTimestamp: '2021-05-17T09:16:19Z' labels: name: mysql-rc spec: replicas: 1 selector: name: mysql-pod template: metadata: labels: name: mysql-pod spec: volumes: - name: mysql-storage persistentVolumeClaim: claimN...
k8s deployment with persistentVolume
kind: Deployment apiVersion: apps/v1 metadata: name: mut-deployment namespace: default labels: app: mut spec: replicas: 1 selector: matchLabels: app: mut template: metadata: labels: app: mut spec: volumes: - name: testcase-storage persistentVolumeClaim: claimName: mut-pvc containers: - name: mut image: 'mut:20210531' ports: - containerPort: 80...