• 首页
  • 狐文
  • 狐图
  • About
狐窝
OvO
  1. 首页
  2. Linux
  3. 正文

K3S 创建portainer

2022年11月10日 20点热度 0人点赞 0条评论

k3s创建portainer

k3s kubectl apply -f /root/portainer.yaml #执行部署
docker network create -d macvlan --subnet=192.168.3.0/24 --gateway=192.168.3.1 -o parent=br0 macvlan #创建 macvlan 网络

portainer.yaml

---
# Source: portainer/templates/namespace.yaml
apiVersion: v1
kind: Namespace
metadata:
  name: portainer
---
# Source: portainer/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: portainer-sa-clusteradmin
  namespace: portainer
  labels:
    app.kubernetes.io/name: portainer
    app.kubernetes.io/instance: portainer
    app.kubernetes.io/version: "ce-latest-ee-2.10.0"
---
# Source: portainer/templates/rbac.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: portainer
  labels:
    app.kubernetes.io/name: portainer
    app.kubernetes.io/instance: portainer
    app.kubernetes.io/version: "ce-latest-ee-2.10.0"
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
- kind: ServiceAccount
  namespace: portainer
  name: portainer-sa-clusteradmin
---
# Source: portainer/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
  name: portainer
  namespace: portainer
  labels:
    io.portainer.kubernetes.application.stack: portainer
    app.kubernetes.io/name: portainer
    app.kubernetes.io/instance: portainer
    app.kubernetes.io/version: "ce-latest-ee-2.10.0"
spec:
  type: NodePort
  ports:
    - port: 9000
      targetPort: 9000
      protocol: TCP
      name: http
      nodePort: 30777  
    - port: 9443
      targetPort: 9443
      protocol: TCP
      name: https
      nodePort: 30779      
    - port: 30776
      targetPort: 30776
      protocol: TCP
      name: edge
      nodePort: 30776
  selector:
    app.kubernetes.io/name: portainer
    app.kubernetes.io/instance: portainer
---
# Source: portainer/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: portainer
  namespace: portainer
  labels:
    io.portainer.kubernetes.application.stack: portainer
    app.kubernetes.io/name: portainer
    app.kubernetes.io/instance: portainer
    app.kubernetes.io/version: "ce-latest-ee-2.10.0"
spec:
  replicas: 1
  strategy:
    type: "Recreate"
  selector:
    matchLabels:
      app.kubernetes.io/name: portainer
      app.kubernetes.io/instance: portainer
  template:
    metadata:
      labels:
        app.kubernetes.io/name: portainer
        app.kubernetes.io/instance: portainer
    spec:
      nodeSelector:
        {}
      serviceAccountName: portainer-sa-clusteradmin
      containers:
        - name: portainer
          image: "portainer/portainer-ce:latest"
          imagePullPolicy: Always
          args:
          - '--tunnel-port=30776'          
          volumeMounts:
            - name: data
              mountPath: /data              
            - name: docker
              mountPath: /var/run/docker.sock              
          ports:
            - name: http
              containerPort: 9000
              protocol: TCP
            - name: https
              containerPort: 9443
              protocol: TCP                
            - name: tcp-edge
              containerPort: 8000
              protocol: TCP              
          livenessProbe:
            httpGet:
              path: /
              port: 9443
              scheme: HTTPS
          readinessProbe:
            httpGet:
              path: /
              port: 9443
              scheme: HTTPS        
          resources:
            {}
      volumes:
        - name: "data"
          hostPath:
            # directory location on host
            path: /mnt/ssd-storage/ix-applications/portainer
            # this field is optional
            type: Directory
        - name: "docker"
          hostPath:
            path: /var/run/docker.sock
标签: k3s linux 创建portainer
最后更新:2022年11月10日

OvO

狐狸

点赞
< 上一篇
下一篇 >
最新 热点 随机
最新 热点 随机
EFI Shell 命令参考命令 说明 证书的SCT相关 ssl证书生成时插入OID TrueNAS SCALE docker安装使用联合文件系统mergerfs Iptables 端口(流量)转发 如何在GIT中删除第一个提交 TrueNas 虚拟机无法连接主机 dnsmasq ipset iptables 实现对流量进行分流 新版 Ubuntu 修改IP DCHP K3S 创建portainer 通过声音进行数据传输 Windows精简部署相关简易内容 ConstraintLayout 和 Coordinator 对比 Android 为View分配id wireshark解析TCP tcpdump rpcapd 相关编译方法 双网卡调整优先级 Android 禁用IPv6
EFI Shell 命令参考命令 说明
TrueNas Scale libvirt-sock RDMA RoCE相关资料 Manjaro 安装记 ESXi主机上备份虚拟机 CentOS 7 为firewalld添加开放端口及相关资料 系统守护进程inetd、xinetd与独立守护进程standalone 添加SCOTT实例步骤 Office 下载、安装、激活,有它就够了! FreeNAS禁用IPv6 和 jails 启用IPv6 vim 按键异常 TrueNas 虚拟机无法连接主机 WIN10禁用WIN+F 卸载linux Mint自带jdk并安装最新jdk ESXI 安装时用到的几个命令 Aria2 使用手札(简易部署 + 快速进阶) Window10上CLion极简配置教程 linux环境 :Linux 共享库LIBRARY_PATH, LD_LIBRARY_PATH 与ld.so.conf npm install 警告 fsevents@1.0.14
标签聚合
密码 下载 windows git 编译 未分类 ssl 网卡 docker http com ipv chrome linux android https

COPYRIGHT © 2020 狐窝. ALL RIGHTS RESERVED.

THEME KRATOS MADE BY VTROIS