docker ui portainer

portainer

1
docker   compose  -f   portainer.yml 
portainer.yml
portainer.yml
version: '3.8'  # 根据你的Docker Compose版本选择合适的版本号
services:
  portainer:
    image: portainer/portainer-ce:alpine-sts
    container_name: portainer
    ports:
      - 8000:9000
      - 9443:9443
    extra_hosts:
      - "portainer.ui.k8s.cn:192.168.122.1" # 添加主机名
    volumes:
      - /mnt/oss/portainer/data:/data
      - /var/run/docker.sock:/var/run/docker.sock
     - /mnt/oss/portainer/public:/public  #chinese
 

chinese https://github.com/outlovecn/portainer-cn

docker pull m.daocloud.io/docker.io/portainer/portainer-ce:2.19.5
docker tag m.daocloud.io/docker.io/portainer/portainer-ce:2.19.5 portainer/portainer-ce:2.19.5

https://docs.portainer.io/advanced/ssl#using-your-own-ssl-certificate-on-docker-standalone

k8s agent

1
kubectl apply -f https://downloads.portainer.io/ce2-20/portainer-agent-k8s-nodeport.yaml

nodeport nodename:port

集群任意节点ip:port即可访问

1
2
3
4
5
6
7
8
❯ kubectl get  pod/portainer-agent-656bfc4479-knj4v --template='{{(index (index .spec.containers 0).ports 0).containerPort}}{{"\n"}}' -n portainer
9001

❯ kubectl get svc -n portainer
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
portainer-agent NodePort 10.111.55.177 <none> 9001:30778/TCP 15h
portainer-agent-headless ClusterIP None <none> <none> 15h

点击打赏
文章目录
  1. 1. portainer
  2. 2. k8s agent
载入天数...载入时分秒... ,