docker图形化管理

一、使用以下Docker命令部署Portainer:只需使用浏览器访问Portainer正在运行的Docker引擎的端口9000。

1、创建数据卷

    docker volume create portainer_data

2、创建容器

    docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer

3、访问测试(初次访问需要设置密码)

ip+端口

4、官方文档:https://portainer.readthedocs.io/en/stable/

二、pointer支持k8s,项目地址:https://github.com/portainer/portainer-k8s

用法
在群集内部署Portainer并通过外部负载均衡器访问它,这将部署Portainer应用程序并创建一个外部负载均衡器,您将可以使用该负载均衡器访问端口9000上的Portainer。
如果您的云提供商支持外部负载均衡器,则可以使用以下命令来部署Portainer:

curl -LO https://raw.githubusercontent.com/portainer/portainer-k8s/master/portainer.yaml
kubectl apply -f portainer.yaml

在群集中部署Portainer并通过节点端口访问它,如果您希望通过群集节点上的特定端口访问Portainer
如果您希望通过群集节点上的特定端口访问Portainer,请使用以下命令:

curl -LO https://raw.githubusercontent.com/portainer/portainer-k8s/master/portainer-nodeport.yaml
kubectl apply -f portainer-nodeport.yaml

使用helm chart部署

kubectl create namespace portainer

helm install --dry-run --debug portainer -n portainer deploy/helm/portainer


helm upgrade -i -n portainer portainer deploy/helm/portainer
## Refer to the output NOTES on how-to access Portainer web## An example is attached below

NOTES:
1. Get the application URL by running these commands:
     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
           You can watch the status of by running 'kubectl get --namespace portainer svc -w portainer'

  export SERVICE_IP=$(kubectl get svc --namespace portainer portainer --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}")
  echo http://$SERVICE_IP:9000
  http://20.40.176.8:9000
  
  删除chart
  
## Delete the Helm Chart
helm delete -n portainer portainer
## Delete the Namespace
kubectl delete namespace portainer

chart配置
下表列出了Portainer图表的可配置参数及其默认值。
在这里插入图片描述
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_47003048/article/details/108445920