Merge pull request #119 from samdulam/upgrade-docs

QuickStart and Re-Organise
pull/120/head
Anthony McMahon 2021-02-11 14:23:20 +13:00 committed by GitHub
commit c54f7fd8aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 1831 additions and 91 deletions

View File

@ -57,7 +57,7 @@
.md-typeset h2 {
margin: 1.6em 0 .64em;
color: #323c48;
color: #13bef9;
font-weight: 700;
font-size: 1.7em;
line-height: 1.4;
@ -98,12 +98,12 @@
}
.md-nav__item {
border-top: 1px solid darkgray;
border-top: 0px solid darkgray;
}
.md-nav__item--active {
border-top: 1px solid darkgray;
border-top: 0px solid darkgray;
}
@ -145,4 +145,47 @@ color: #e86a25;
}
}
.md-grid {
max-width: 1440px;
}
.tabbed-set {
display: flex;
position: relative;
flex-wrap: wrap;
}
.tabbed-set .highlight {
background: #ddd;
}
.tabbed-set .tabbed-content {
display: none;
order: 99;
width: 100%;
}
.tabbed-set label {
width: auto;
margin: 0 0.5em;
padding: 0.25em;
font-size: 120%;
cursor: pointer;
}
.tabbed-set input {
position: absolute;
opacity: 0;
}
.tabbed-set input:nth-child(n+1) {
color: #333333;
}
.tabbed-set input:nth-child(n+1):checked + label {
color: #e86a25;
}
.tabbed-set input:nth-child(n+1):checked + label + .tabbed-content {
display: block;
}

View File

@ -1,10 +1,10 @@
# Welcome
# :fontawesome-solid-door-open: Welcome
Welcome to the official Portainer Documentation.
This is an open source documentation project and all community contributions are welcome and encouraged.
For information about contributing to the Portainer documentation, see [Contribution guidelines](https://github.com/portainer/portainer-docs/blob/master/contributing.md).
## About Portainer
## :fontawesome-solid-address-card: About Portainer
Portainer Community Edition 2.0 is the foundation of the Portainer world. With over half a million regular users, its a powerful, open-source toolset that allows you to easily build and manage containers in Docker, Swarm, Kubernetes and Azure ACI.
@ -12,7 +12,7 @@ Portainer works by hiding the complexity that makes managing containers hard, be
The Portainer development team is here to assist you on your container journey; you can engage with them any time through our community-based support channels.
## Support Channels
## :material-comment-account: Support Channels
As the Portainer community continues to grow, we continue to support the community to the best of our ability.
Being a free and opensource product, we have been heavily reliant on our community to provide "how to" support to our community, recently we have invested significant time in improving and updating our documentation found on this site and our [YouTube channel](https://www.youtube.com/channel/UC7diMJcrULjDseq5yhSUZgg). While we endeavour to cover as many scenarios as possible there may be some that our documentation doesnt cover.
@ -29,6 +29,6 @@ To streamline our operations and allow us to focus on delivering the right suppo
We will not provide support over email.
## Notes
## :material-note-text: Notes
[Contribute to these docs](https://github.com/portainer/portainer-docs/blob/master/contributing.md).

42
docs/quickstart.md Normal file
View File

@ -0,0 +1,42 @@
# :fontawesome-solid-paper-plane: Installation
Portainer comes in two flavours Portainer CE and Portainer BE. Portainer CE is open source, free forever and used by 500,000 developers worldwide. Portainer Business builds on CE and adds business related functionality.
You can find a feature comparision [here](https://www.portainer.io/products).
Choose a Portainer Edition that you would like to Deploy
=== "Portainer CE"
!!! Abstract ""
Portainer Application can be deployed to any of the following platforms, Click on your platform button to go to relevant Installation guide.
Requirements and Validated Configuration Matrix can be found [here](/v2.0/deploy/requirements/)
<br>
<br>
[Docker](../v2.0/deploy/ceinstalldocker/){: .md-button }
[Docker Swarm](../v2.0/deploy/ceinstallswarm/){: .md-button }
[Kubernetes](../v2.0/deploy/ceinstallk8s/){: .md-button }
=== "Portainer BE"
!!! Abstract ""
Portainer Business Edition requires a valid License to be added post install. You may obtain a trial license [here](https://www.portainer.io/cs/c/?cta_guid=e7ecf652-0dc4-4573-98fd-625c998881c0&signature=AAH58kHAbNkEVsCC-NRo1IbuaqqghzuG_w&pageId=34661871872&placement_guid=27c1272a-fd17-42e5-8434-995186df6b30&click=a2e34f07-577d-41f4-b431-766da3b248f1&hsutk=baf3ff7dd5eac1063485049de23c94b7&canon=https%3A%2F%2Fwww.portainer.io%2F&portal_id=4731999&redirect_url=APefjpGiR1deqnkdtUJaPieCYM8eTjZYGmfVDPkpMGDPEDgPhzoocs3Bp9amAcaosCVU6OO-1xfPkj8YCNwOIiead1AE0EhsVLiEAgTt-Ej87_LgEY_V9AJWxOLbPB8Tcerk5CRahbYj5gZStnziiPwX_gCm7u6VBOkMErpCVQvcpbtKt0e2hN4dnYY15o7Jawfk_fM8AIEy19Kf4T0WD7kQPuvYS7BFcuHisNBFs5Fu87085y9hNn4&__hstc=146943656.baf3ff7dd5eac1063485049de23c94b7.1611489451749.1612961821682.1612999980872.20&__hssc=146943656.1.1612999980872&__hsfp=3914124624&contentType=standard-page){target=_blank} if required.
Portainer Application can be deployed to any of the following platforms, Click on your platform button to go to relevant Installation guide.
Requirements and Validated Configuration Matrix can be found [here](/v2.0-be/deploy/requirements/)
<br>
<br>
[Docker](../v2.0-be/deploy/beinstalldocker/){: .md-button }
[Docker Swarm](../v2.0-be/deploy/beinstallswarm/){: .md-button }
[Kubernetes](../v2.0-be/deploy/beinstallk8s/){: .md-button }
<br>
## :material-note-text: Notes
[Contribute to these docs](https://github.com/portainer/portainer-docs/blob/master/contributing.md).

View File

@ -0,0 +1,255 @@
---
hide: toc
---
# :fontawesome-brands-docker: Deploying Portainer BE in Docker
Portainer is comprised of two elements, the Portainer Server, and the Portainer Agent. Both elements run as lightweight Docker containers on a Docker engine or within a Swarm cluster. Due to the nature of Docker, there are many possible deployment scenarios, however, we have detailed the most common below. Please use the scenario that matches your configuration.
Note that the recommended deployment mode when using Swarm is using the Portainer Agent.
By default, Portainer will expose the UI over the port 9000 and expose a TCP tunnel server over the port 8000. The latter is optional and is only required if you plan to use the Edge compute features with Edge agents.
To see the requirements, please, visit the page of [requirements](/v2.0-be/deploy/requirements/).
## :fontawesome-solid-paper-plane: Portainer Deployment
Use the following Docker commands to deploy the Portainer Server; note the agent is not needed on standalone hosts, however it does provide additional functionality if used (see Portainer and agent scenario below):
=== "Docker on Linux"
!!! Abstract ""
### Portainer Server Deployment
```shell
docker volume create portainer_data
```
```shell
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ee:latest
```
### Portainer Agent Only Deployment
Run the following command to deploy the Agent in your Docker host.
```shell
docker run -d -p 9001:9001 --name portainer_agent --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/volumes:/var/lib/docker/volumes portainer/agent:2.0.0
```
=== "Docker on Windows WSL"
!!! Abstract ""
Before you can deploy Portainer in Docker Standalone running in Windows, you need to install WSL. [Read this guide to know more about WSL/WSL2](https://docs.microsoft.com/en-us/windows/wsl/install-win10)
Use the following Docker commands to deploy the Portainer Server; note the agent is not needed on standalone hosts, however it does provide additional functionality if used (see portainer and agent scenario below):
### Portainer Server Deployment
```shell
docker volume create portainer_data
```
```shell
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ee:latest
```
### Portainer Agent Only Deployment
Run the following command to deploy the Agent in your Docker host.
```shell
docker run -d -p 9001:9001 --name portainer_agent --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/volumes:/var/lib/docker/volumes portainer/agent:2.0.0
```
=== "Docker on Windows Container Service"
!!! Abstract ""
To run Portainer in a Windows Server/Desktop Environment, you need to create exceptions in the firewall. These, can be easy added trough PowerShell, running the following commands:
```PowerShell
netsh advfirewall firewall add rule name="cluster_management" dir=in action=allow protocol=TCP localport=2377
```
```PowerShell
netsh advfirewall firewall add rule name="node_communication_tcp" dir=in action=allow protocol=TCP localport=7946
```
```PowerShell
netsh advfirewall firewall add rule name="node_communication_udp" dir=in action=allow protocol=UDP localport=7946
```
```PowerShell
netsh advfirewall firewall add rule name="overlay_network" dir=in action=allow protocol=UDP localport=4789
```
```PowerShell
netsh advfirewall firewall add rule name="swarm_dns_tcp" dir=in action=allow protocol=TCP localport=53
```
```PowerShell
netsh advfirewall firewall add rule name="swarm_dns_udp" dir=in action=allow protocol=UDP localport=53
```
You also need to install Windows Container Host Service and Install Docker.
```PowerShell
Enable-WindowsOptionalFeature -Online -FeatureName containers -All
```
```PowerShell
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
```
```PowerShell
Install-Package -Name docker -ProviderName DockerMsftProvider
```
Lastly, you need to restart your Windows Server. After it has restarted, you're ready to deploy Portainer.
### Portainer Server Deployment
```PowerShell
docker volume create portainer_data
```
```PowerShell
docker run -d -p 9000:9000 --name portainer --restart always -v \\.\pipe\docker_engine:\\.\pipe\docker_engine -v portainer_data:C:\data portainer/portainer-ee:latest
```
Now, you can navigate to http://localhost:9000 or the IP of the server and start using Portainer.
### Portainer Agent Only Deployment
To run Portainer Agent in a Windows Container scenario, you need to execute the following commands:
```PowerShell
docker run -d -p 9001:9001 --name portainer_agent --restart=always -v \\.\pipe\docker_engine:\\.\pipe\docker_engine portainer/agent:2.0.0
```
??? Tip "Advanced Options"
# CLI Configuration Options
Portainer can be easily tuned using CLI flags.
## Admin password
### From the command line
Portainer allows you to specify a bcrypt encrypted password from the command line for the admin account. You need to generate the bcrypt encrypted password first.
You can generate the encrypted password with the following command if you have installed apache2-utils package:
```shell
htpasswd -nb -B admin "your-password" | cut -d ":" -f 2
```
If your system does not have the mentioned command, you can run a container to run the command:
```shell
docker run --rm httpd:2.4-alpine htpasswd -nbB admin "your-password" | cut -d ":" -f 2
```
To specify the admin password from the command line, start Portainer with the <code>--admin-password</code> flag:
```shell
docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce --admin-password='$2y$05$8oz75U8m5tI/xT4P0NbSHeE7WyRzOWKRBprfGotwDkhBOGP/u802u'
```
### Inside a file
You can also store the plaintext password inside a file and use the <code>--admin-password-file</code> flag:
Add your password to a file running the following command:
```shell
echo -n mypassword > /tmp/portainer_password
```
Now you can start the Portainer container by running:
```shell
docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/portainer_password:/tmp/portainer_password portainer/portainer-ce --admin-password-file /tmp/portainer_password
```
This works well with Docker Swarm and Docker secrets too:
```shell
echo -n mypassword | docker secret create portainer-pass -
```
```shell
docker service create \
--name portainer \
--secret portainer-pass \
--publish 9000:9000 \
--publish 8000:8000 \
--replicas=1 \
--constraint 'node.role == manager' \
--mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
portainer/portainer-ce \
--admin-password-file '/run/secrets/portainer-pass' \
-H unix:///var/run/docker.sock
```
Note: This will automatically create an administrator account called admin with the specified password.
## Hiding specific containers
Portainer allows you to hide containers with a specific label by using the -l flag.
For example, take a container started with the label owner=acme (note that this is an example label, you can define your own labels):
```shell
docker run -d --label owner=acme nginx
```
To hide this container, simply add the -l owner=acme option on the CLI when starting Portainer:
```shell
docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce -l owner=acme
```
Note that the -l flag can be repeated multiple times to specify multiple labels:
```shell
docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce -l owner=acme -l service=secret
```
## Use your own logo
You do not like our logo? Want to make Portainer more corporate? Dont worry, you can easily switch for an external logo (it must be exactly 155px by 55px) using the <code>--logo flag</code>:
```shell
docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce --logo "https://www.docker.com/sites/all/themes/docker/assets/images/brand-full.svg"
```
This can also be completed via the GUI in the Portaner Settings menu
## Use your own templates
Portainer allows you to rapidly deploy containers using App Templates.
By default Portainer templates will be used but you can also define your own templates.
Note: at the moment, templates are only loaded once at first Portainer startup. If you already deployed a Portainer instance and want to use your own templates after this, youll need to clear any existing templates (default templates) via the HTTP API.
Using the <code>--templates</code> flag you can specify an URL where the template file can be accessed via HTTP.
```shell
docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce --templates http://my-host.my-domain/templates.json
```
Suggestion: You can host your template files in [Github](https://www.github.com)
## Available flags
The following CLI flags are available:
* <code>--admin-password</code>: Specify a bcrypt hashed password for the admin user
* <code>--admin-password-file</code>: Path to the file containing the password for the admin user
* <code>--bind, -p</code>: Address and port to serve Portainer (default: :9000)
* <code>--data, -d</code>: Directory where Portainer data will be stored (default: /data on Linux, C:\data on Windows)
* <code>--edge-compute</code>: Automatically enable edge-compute features
* <code>--hide-label, -l</code>: Hide containers with a specific label in the UI
* <code>--host, -H</code>: Docker daemon endpoint
* <code>--logo</code>: URL to a picture to be displayed as a logo in the UI, use Portainer logo if not specified
* <code>--snapshot-interval</code>: Time interval between two endpoint snapshot jobs expressed as a string, e.g. 30s, 5m, 1h… as supported by the time.ParseDuration method (default: 5m)
* <code>--ssl</code>: Secure Portainer instance using SSL (default: false)
* <code>--sslcert</code>: Path to the SSL certificate used to secure the Portainer instance (default: /certs/portainer.crt, C:\certs\portainer.crt on Windows)
* <code>--sslkey</code>: Path to the SSL key used to secure the Portainer instance (default: /certs/portainer.key, C:\certs\portainer.key on Windows)
* <code>--templates, -t</code>: URL to templates (apps) definitions
* <code>--tlscacert</code>: Path to the CA (default: /certs/ca.pem on Linux, C:\certs\ca.pem on Windows)
* <code>--tlscert</code>: Path to the TLS certificate file (default: /certs/cert.pem, C:\certs\cert.pem on Windows)
* <code>--tlskey</code>: Path to the TLS key (default: /certs/key.pem, C:\certs\key.pem on Windows)
* <code>--tlsverify</code>: TLS support (default: false)
* <code>--tunnel-port</code>: Specify an alternate tunnel port to use with the Edge agent. Use --tunnel-port 8001 with -p 8001:8001 to make the Edge agent communicate on port 8001
<br>
## :material-note-text: Notes
[Contribute to these docs](https://github.com/portainer/portainer-docs/blob/master/contributing.md).

View File

@ -0,0 +1,257 @@
---
hide: toc
---
# :material-kubernetes: Deploying Portainer BE in Kubernetes
To see the requirements, please, visit the page of [requirements](/v2.0-be/deploy/requirements/).
## :fontawesome-solid-paper-plane: Portainer Deployment
---
### :material-list-status: Pre-Req Note:
Portainer requires data persistence, and as a result needs at least one storage-class available to use. Portainer will attempt to use the "default" storage class during deployment. If you do NOT have a storage class tagged as "default" the deployment will likely fail.
You can check if you have a default storage class by running:
```shell
kubectl get sc
```
and looking for a storage class with (default) after its name:
![defaultsc](assets/defaultsc.png)
```shell
kubectl patch storageclass <storage-class-name> -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
```
and replace <storage-class-name> with the name of your storage class
Example: `kubectl patch storageclass local-path -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'`
Alternatively, if installing using our helm chart you can add the following option with helm install:
```shell
--set persistence.storageClass=<storage-class-name>
```
---
<br>
**To deploy Portainer within a Kubernetes cluster, you can either use our HELM chart, or our provided manifests.**
=== "Deploy using Helm"
!!! Abstract ""
### :fontawesome-solid-server: Portainer Server Deployment
Ensure you're using at least helm v3.2, which [includes support](https://github.com/helm/helm/pull/7648) for the `--create-namespace` argument.
First, add the Portainer helm repo running the following:
```shell
helm repo add portainer https://portainer.github.io/k8s/
```
```shell
helm repo update
```
Based on how you would like expose Portainer Service, Select an option below
=== "NodePort"
Using the following command, Portainer will be available on port 30777.
```shell
helm install --create-namespace -n portainer portainer portainer/portainer \
--set enterpriseEdition.enabled=true
```
=== "Ingress"
Using the following command, Poratainer service will be assigned a Cluster IP. You should use this with an Ingress, see Chart Configuration Options for Ingress related options.
```shell
helm install --create-namespace -n portainer portainer portainer/portainer \
--set enterpriseEdition.enabled=true \
--set service.type=ClusterIP
```
??? Hint "Example Deployment with Nginx Ingress"
```shell
helm install --create-namespace -n portainer portainer portainer/portainer \
--set enterpriseEdition.enabled=true \
--set service.type=ClusterIP \
-- set ingress.enabled=true \
-- set ingress.annotations='kubernetes.io/ingress.class: nginx' \
-- set ingress.hosts.host=portainer.example.io
=== "LoadBalancer"
Using the following command, Portainer will be available at an assigned LoadBalancer IP @ port 9000.
```shell
helm install --create-namespace -n portainer portainer portainer/portainer \
--set enterpriseEdition.enabled=true \
--set service.type=LoadBalancer
```
??? Note "Chart Configuration Options"
The following table lists the configurable parameters of the Portainer chart and their default values. The values file can be found under `deploy/helm/portainer/values.yaml`.
*The parameters will be keep updating.*
| Parameter | Description | Default |
| - | - | - |
| `replicaCount` | Number of Portainer service replicas (ALWAYS set to 1) | `1` |
| `image.repository` | Portainer Docker Hub repository | `portainer/portainer-ce` |
| `image.tag` | Tag for the Portainer image | `latest` |
| `image.pullPolicy` | Portainer image pulling policy | `IfNotPresent` |
| `imagePullSecrets` | If Portainer image requires to be in a private repository | `nil` |
| `nodeSelector` | Used to apply a nodeSelector to the deployment | `{}` |
| `serviceAccount.annotations` | Annotations to add to the service account | `null` |
| `serviceAccount.name` | The name of the service account to use | `portainer-sa-clusteradmin` |
| `service.type` | Service Type for the main Portainer Service; ClusterIP, NodePort and LoadBalancer | `LoadBalancer` |
| `service.httpPort` | HTTP port for accessing Portainer Web | `9000` |
| `service.httpNodePort` | Static NodePort for accessing Portainer Web. Specify only if the type is NodePort | `30777` |
| `service.edgePort` | TCP port for accessing Portainer Edge | `8000` |
| `service.edgeNodePort` | Static NodePort for accessing Portainer Edge. Specify only if the type is NodePort | `30776` |
| `service.annotations` | Annotations to add to the service | `{}` |
| `ingress.enabled` | Create an ingress for Portainer | `false` |
| `ingress.annotations` | Annotations to add to the ingress. For instane, `kubernetes.io/ingress.class: nginx` | `{}` |
| `ingress.hosts.host` | URL for Portainer Web. For instance, `portainer.example.io` | `nil` |
| `ingress.hosts.paths.path` | Path for the Portainer Web. | `/` |
| `ingress.hosts.paths.port` | Port for the Portainer Web. | `9000` |
| `ingress.tls` | TLS support on ingress. Must create a secret with TLS certificates in advance | `[]` |
| `resources` | Portainer resource requests and limits | `{}` |
| `persistence.enabled` | Whether to enable data persistence | `true` |
| `persistence.existingClaim` | Name of an existing PVC to use for data persistence | `nil` |
| `persistence.size` | Size of the PVC used for persistence | `10Gi` |
| `persistence.annotations` | Annotations to apply to PVC used for persistence | `{}` |
| `persistence.storageClass` | StorageClass to apply to PVC used for persistence | `default` |
| `persistence.accessMode` | AccessMode for persistence | `ReadWriteOnce` |
| `persistence.selector` | Selector for persistence | `nil` |
### :fontawesome-solid-laptop: Portainer Agent Only Deployment
Helm chart for Agent Only Deployments will be available soon.
In the mean time please head over to YAML Manifests tab.
=== "Deploy using YAML Manifests"
!!! Abstract ""
### :fontawesome-solid-server: Portainer Server Deployment
Based on how you would like expose Portainer Service, Select an option below
=== "NodePort"
Using the following command, Portainer will be available on port 30777.
```shell
kubectl apply -n portainer -f https://raw.githubusercontent.com/portainer/k8s/master/deploy/manifests/portainer/portainer-ee.yaml
```
=== "LoadBalancer"
Using the following command, Portainer will be available at an assigned LoadBalancer IP @ port 9000.
```shell
kubectl apply -n portainer -f https://raw.githubusercontent.com/portainer/k8s/master/deploy/manifests/portainer/portainer-lb-ee.yaml
```
### :fontawesome-solid-laptop: Portainer Agent Only Deployment
Choose one of the tabs below based on how you would like to expose the agent.
=== "NodePort"
Run the following command to deploy the Agent in your Kubernetes Cluster, agent will be available on port 30778.
```shell
kubectl apply -n portainer -f https://downloads.portainer.io/portainer-agent-k8s-nodeport.yaml
```
=== "LoadBalancer"
Run the following command to deploy the Agent in your Kubernetes Cluster, agent will be available on LoadBalancer assigned IP @ port 9001
```shell
kubectl apply -n portainer -f https://downloads.portainer.io/portainer-agent-k8s-lb.yaml
```
=== "Deploy on Windows WSL"
!!!Abstract ""
You can deploy Portainer in a Kubernetes environment in Windows using Docker Desktop.
!!! Note
This scenario is for testing purpose only.
### Enable Kubernetes in Docker Desktop
To enable Kubernetes in Docker Desktop, you need to open the dashboard of Docker Desktop. Right click the Docker icon in the system tray and click "dashboard"
![dashboard](assets/windows10-1.png)
Click Settings:
![settings](assets/windows10-2.png)
1. Select Kubernetes 2. Select 'Enable Kubernetes' 3. Click 'Apply and Restart'.
![kubernetes](assets/windows10-3.png)
After a few minutes, you will see that Kubernetes is running:
![kubernetes_running](assets/windows10-4.png)
### :fontawesome-solid-server: Portainer Server Deployment
Based on how you would like expose Portainer Service, Select an option below
=== "NodePort"
Using the following command, Portainer will be available on port 30777.
```shell
kubectl apply -n portainer -f https://raw.githubusercontent.com/portainer/k8s/master/deploy/manifests/portainer/portainer-ee.yaml
```
=== "LoadBalancer"
Using the following command, Portainer will be available at an assigned LoadBalancer IP @ port 9000.
```shell
kubectl apply -n portainer -f https://raw.githubusercontent.com/portainer/k8s/master/deploy/manifests/portainer/portainer-lb-ee.yaml
```
### :fontawesome-solid-laptop: Portainer Agent Only Deployment
Choose one of the tabs below based on how you would like to expose the agent.
=== "NodePort"
Run the following command to deploy the Agent in your Kubernetes Cluster, agent will be available on port 30778.
```shell
kubectl apply -n portainer -f https://downloads.portainer.io/portainer-agent-k8s-nodeport.yaml
```
=== "LoadBalancer"
Run the following command to deploy the Agent in your Kubernetes Cluster, agent will be available on LoadBalancer assigned IP @ port 9001
```shell
kubectl apply -n portainer -f https://downloads.portainer.io/portainer-agent-k8s-lb.yaml
```
---
???+ Tip "Regarding Persisting Data"
The charts/manifests will create a persistent volume for storing Portainer data, using the default StorageClass.
In some Kubernetes clusters (microk8s), the default Storage Class simply creates hostPath volumes, which are not explicitly tied to a particular node. In a multi-node cluster, this can create an issue when the pod is terminated and rescheduled on a different node, "leaving" all the persistent data behind and starting the pod with an "empty" volume.
While this behaviour is inherently a limitation of using hostPath volumes, a suitable workaround is to use add a nodeSelector to the deployment, which effectively "pins" the portainer pod to a particular node.
The nodeSelector can be added in the following ways:
1. Edit your own values.yaml and set the value of nodeSelector like this:
nodeSelector: kubernetes.io/hostname: \<YOUR NODE NAME>
2. Explicictly set the target node when deploying/updating the helm chart on the CLI, by including `--set nodeSelector.kubernetes.io/hostname=<YOUR NODE NAME>`
3. If you've deployed Portainer via manifests, without Helm, run the following one-liner to "patch" the deployment, forcing the pod to always be scheduled on the node it's currently running on:
kubectl patch deployments -n portainer portainer -p '{"spec": {"template": {"spec": {"nodeSelector": {"kubernetes.io/hostname": "'$(kubectl get pods -n portainer -o jsonpath='{ ..nodeName }')'"}}}}}' || (echo Failed to identify current node of portainer pod; exit 1)
<br>
## :material-note-text: Notes
[Contribute to these docs](https://github.com/portainer/portainer-docs/blob/master/contributing.md).
<!-- {{ snippet('https://github.com/portainer/k8s.git', 'charts/portainer/README.md', '# Chart Configuration') }} -->

View File

@ -0,0 +1,161 @@
---
hide: toc
---
# :fontawesome-brands-docker: Deploying Portainer BE in Docker Swarm
Portainer is comprised of two elements, the Portainer Server, and the Portainer Agent. Both elements run as lightweight Docker containers on a Docker engine or within a Swarm cluster. Due to the nature of Docker, there are many possible deployment scenarios, however, we have detailed the most common below. Please use the scenario that matches your configuration.
Note that the recommended deployment mode when using Swarm is using the Portainer Agent.
By default, Portainer will expose the UI over the port 9000 and expose a TCP tunnel server over the port 8000. The latter is optional and is only required if you plan to use the Edge compute features with Edge agents.
To see the requirements, please, visit the page of [requirements](/v2.0-be/deploy/requirements/).
## :fontawesome-solid-paper-plane: Portainer Deployment
Use the following Docker commands to deploy the Portainer Server; note the agent is not needed on standalone hosts, however it does provide additional functionality if used (see Portainer and agent scenario below):
=== "Docker Swarm on Linux"
!!! Abstract ""
### Portainer Server Deployment
Deploying Portainer and the Portainer Agent to manage a Swarm cluster is easy! You can directly deploy Portainer as a service in your Docker cluster. Note that this method will automatically deploy a single instance of the Portainer Server, and deploy the Portainer Agent as a global service on every node in your cluster.
```shell
curl -L https://downloads.portainer.io/portainer-ee-agent-stack.yml -o portainer-agent-stack.yml
```
```shell
docker stack deploy -c portainer-agent-stack.yml portainer
```
<b>Note</b>: By default this stack doesn't enable Host Management Features, you need to enable from the UI of Portainer.
### Portainer Agent Only Deployment
Deploy Portainer Agent on a remote LINUX Swarm Cluster as a Swarm Service, run this command on a manager node in the remote cluster.
First create the network:
```shell
docker network create portainer_agent_network
```
The following step to deploy the Agent:
```shell
docker service create --name portainer_agent --network portainer_agent_network --publish mode=host,target=9001,published=9001 -e AGENT_CLUSTER_ADDR=tasks.portainer_agent --mode global --mount type=bind,src=//var/run/docker.sock,dst=/var/run/docker.sock --mount type=bind,src=//var/lib/docker/volumes,dst=/var/lib/docker/volumes --mount type=bind,src=/,dst=/host portainer/agent:2.0.0
```
=== "Docker Swarm on Windows WSL"
!!! Abstract ""
Before you can deploy Portainer in Docker Swarm running in Windows, you need to install WSL. [Read this guide to know more about WSL/WSL2](https://docs.microsoft.com/en-us/windows/wsl/install-win10)
Use the following Docker Swarmcommands to deploy the Portainer Server; note the agent is not needed on standalone hosts, however it does provide additional functionality if used (see portainer and agent scenario below):
### Portainer Server Deployment
Deploying Portainer and the Portainer Agent to manage a Swarm cluster is easy! You can directly deploy Portainer as a service in your Docker cluster. Note that this method will automatically deploy a single instance
of the Portainer Server, and deploys the Portainer Agent as a global service on every node in your cluster.
Remember to initiate the Docker Swarm mode when you use Docker Desktop. You can do this running the following command:
```shell
docker swarm init
```
The terminal will reply with this:
```shell
Swarm initialized: current node (15gbf4d66mvzk3die00sgirpf) is now a manager.
To add a worker to this swarm, run the following command:
docker swarm join --token SWMTKN-1-096qbnf2b9yywagu5ht3731zlpkeqazgctffolntsiljfp0m34-c4snnxplgwq2bd1ohta8k48b9 192.168.65.3:2377
To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.
```
Once this is done, you can continue with the installation running the following command:
```shell
curl -L https://downloads.portainer.io/portainer-ee-agent-stack.yml -o portainer-agent-stack.yml
```
```shell
docker stack deploy -c portainer-agent-stack.yml portainer
```
### Portainer Agent Only Deployment
Deploy Portainer Agent on a Swarm Cluster as a Swarm Service, run this command in a manager node in the cluster.
```shell
docker service create --name portainer_agent --network portainer_agent_network --publish mode=host,target=9001,published=9001 -e AGENT_CLUSTER_ADDR=tasks.portainer_agent --mode global --mount type=bind
src=//var/run/docker.sock,dst=/var/run/docker.sock --mount type=bind,src=//var/lib/docker/volumes,dst=/var/lib/docker/volumes -mount type=bind,src=/,dst=/host portainer/agent:2.0.0
```
=== "Docker Swarm on Windows Container Service"
!!! Abstract ""
To run Portainer in a Windows Server/Desktop Environment, you need to create exceptions in the firewall. These, can be easy added through PowerShell, running the following commands:
```shell
netsh advfirewall firewall add rule name="cluster_management" dir=in action=allow protocol=TCP localport=2377
```
```shell
netsh advfirewall firewall add rule name="node_communication_tcp" dir=in action=allow protocol=TCP localport=7946
```
```shell
netsh advfirewall firewall add rule name="node_communication_udp" dir=in action=allow protocol=UDP localport=7946
```
```shell
netsh advfirewall firewall add rule name="overlay_network" dir=in action=allow protocol=UDP localport=4789
```
```shell
netsh advfirewall firewall add rule name="swarm_dns_tcp" dir=in action=allow protocol=TCP localport=53
```
```shell
netsh advfirewall firewall add rule name="swarm_dns_udp" dir=in action=allow protocol=UDP localport=53
```
You also need to install Windows Container Host Service and Install Docker.
```shell
Enable-WindowsOptionalFeature -Online -FeatureName containers -All
```
```shell
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
```
```shell
Install-Package -Name docker -ProviderName DockerMsftProvider
```
Lastly, you need to restart your Windows Server. After it has restarted, you're ready to deploy Portainer.
### Portainer Server Deployment
You can use our YML manifest to run Portainer in Windows using Windows Containers. In Powershell, run:
```PowerShell
curl https://downloads.portainer.io/portainer_ee_windows_stack.yml -o portainer_windows_stack.yml
```
```PowerShell
docker stack deploy --compose-file=portainer_windows_stack.yml portainer
```
Now, you can navigate to http://localhost:9000 or the IP of the server and start using Portainer.
### Portainer Agent Only Deployment
To run Portainer Agent in a Windows Container scenario, you need to execute the following commands:
```PowerShell
curl -L https://downloads.portainer.io/agent-ee-stack-windows.yml -o agent-stack-windows.yml && docker stack deploy --compose-file=agent-stack-windows.yml portainer-agent
```
<br>
## :material-note-text: Notes
[Contribute to these docs](https://github.com/portainer/portainer-docs/blob/master/contributing.md).

View File

@ -0,0 +1,255 @@
---
hide:
- toc
---
# :fontawesome-brands-docker: Deploying Portainer CE in Docker
Portainer is comprised of two elements, the Portainer Server, and the Portainer Agent. Both elements run as lightweight Docker containers on a Docker engine or within a Swarm cluster. Due to the nature of Docker, there are many possible deployment scenarios, however, we have detailed the most common below. Please use the scenario that matches your configuration.
Note that the recommended deployment mode when using Swarm is using the Portainer Agent.
By default, Portainer will expose the UI over the port 9000 and expose a TCP tunnel server over the port 8000. The latter is optional and is only required if you plan to use the Edge compute features with Edge agents.
To see the requirements, please, visit the page of [requirements](/v2.0/deploy/requirements).
## :fontawesome-solid-paper-plane: Portainer Deployment
Use the following Docker commands to deploy the Portainer Server; note the agent is not needed on standalone hosts, however it does provide additional functionality if used (see Portainer and agent scenario below):
=== "Docker on Linux"
!!! Abstract ""
### :fontawesome-solid-server: Portainer Server Deployment
```shell
docker volume create portainer_data
```
```shell
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
```
### :fontawesome-solid-laptop: Portainer Agent Only Deployment
Run the following command to deploy the Agent in your Docker host.
```shell
docker run -d -p 9001:9001 --name portainer_agent --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/volumes:/var/lib/docker/volumes portainer/agent
```
=== "Docker on Windows WSL"
!!! Abstract ""
Before you can deploy Portainer in Docker Standalone running in Windows, you need to install WSL. [Read this guide to know more about WSL/WSL2](https://docs.microsoft.com/en-us/windows/wsl/install-win10)
Use the following Docker commands to deploy the Portainer Server; note the agent is not needed on standalone hosts, however it does provide additional functionality if used (see portainer and agent scenario below):
### :fontawesome-solid-server: Portainer Server Deployment
```shell
docker volume create portainer_data
```
```shell
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
```
### :fontawesome-solid-laptop: Portainer Agent Only Deployment
Run the following command to deploy the Agent in your Docker host.
```shell
docker run -d -p 9001:9001 --name portainer_agent --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/volumes:/var/lib/docker/volumes portainer/agent
```
=== "Docker on Windows Container Service"
!!! Abstract ""
To run Portainer in a Windows Server/Desktop Environment, you need to create exceptions in the firewall. These, can be easy added trough PowerShell, running the following commands:
```shell
netsh advfirewall firewall add rule name="cluster_management" dir=in action=allow protocol=TCP localport=2377
```
```shell
netsh advfirewall firewall add rule name="node_communication_tcp" dir=in action=allow protocol=TCP localport=7946
```
```shell
netsh advfirewall firewall add rule name="node_communication_udp" dir=in action=allow protocol=UDP localport=7946
```
```shell
netsh advfirewall firewall add rule name="overlay_network" dir=in action=allow protocol=UDP localport=4789
```
```shell
netsh advfirewall firewall add rule name="swarm_dns_tcp" dir=in action=allow protocol=TCP localport=53
```
```shell
netsh advfirewall firewall add rule name="swarm_dns_udp" dir=in action=allow protocol=UDP localport=53
```
You also need to install Windows Container Host Service and Install Docker.
```shell
Enable-WindowsOptionalFeature -Online -FeatureName containers -All
```
```shell
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
```
```shell
Install-Package -Name docker -ProviderName DockerMsftProvider
```
Lastly, you need to restart your Windows Server. After it has restarted, you're ready to deploy Portainer.
### :fontawesome-solid-server: Portainer Server Deployment
```shell
docker volume create portainer_data
```
```shell
docker run -d -p 9000:9000 --name portainer --restart always -v \\.\pipe\docker_engine:\\.\pipe\docker_engine -v portainer_data:C:\data portainer/portainer-ce
```
Now, you can navigate to http://localhost:9000 or the IP of the server and start using Portainer.
### :fontawesome-solid-laptop: Portainer Agent Only Deployment
To run Portainer Agent in a Windows Container scenario, you need to execute the following commands:
```shell
docker run -d -p 9001:9001 --name portainer_agent --restart=always -v \\.\pipe\docker_engine:\\.\pipe\docker_engine portainer/agent
```
??? Tip "Advanced Options"
# CLI Configuration Options
Portainer can be easily tuned using CLI flags.
## Admin password
### From the command line
Portainer allows you to specify a bcrypt encrypted password from the command line for the admin account. You need to generate the bcrypt encrypted password first.
You can generate the encrypted password with the following command if you have installed apache2-utils package:
```shell
htpasswd -nb -B admin "your-password" | cut -d ":" -f 2
```
If your system does not have the mentioned command, you can run a container to run the command:
```shell
docker run --rm httpd:2.4-alpine htpasswd -nbB admin "your-password" | cut -d ":" -f 2
```
To specify the admin password from the command line, start Portainer with the <code>--admin-password</code> flag:
```shell
docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce --admin-password='$2y$05$8oz75U8m5tI/xT4P0NbSHeE7WyRzOWKRBprfGotwDkhBOGP/u802u'
```
### Inside a file
You can also store the plaintext password inside a file and use the <code>--admin-password-file</code> flag:
Add your password to a file running the following command:
```shell
echo -n mypassword > /tmp/portainer_password
```
Now you can start the Portainer container by running:
```shell
docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/portainer_password:/tmp/portainer_password portainer/portainer-ce --admin-password-file /tmp/portainer_password
```
This works well with Docker Swarm and Docker secrets too:
```shell
echo -n mypassword | docker secret create portainer-pass -
```
```shell
docker service create \
--name portainer \
--secret portainer-pass \
--publish 9000:9000 \
--publish 8000:8000 \
--replicas=1 \
--constraint 'node.role == manager' \
--mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
portainer/portainer-ce \
--admin-password-file '/run/secrets/portainer-pass' \
-H unix:///var/run/docker.sock
```
Note: This will automatically create an administrator account called admin with the specified password.
## Hiding specific containers
Portainer allows you to hide containers with a specific label by using the -l flag.
For example, take a container started with the label owner=acme (note that this is an example label, you can define your own labels):
```shell
docker run -d --label owner=acme nginx
```
To hide this container, simply add the -l owner=acme option on the CLI when starting Portainer:
```shell
docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce -l owner=acme
```
Note that the -l flag can be repeated multiple times to specify multiple labels:
```shell
docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce -l owner=acme -l service=secret
```
## Use your own logo
You do not like our logo? Want to make Portainer more corporate? Dont worry, you can easily switch for an external logo (it must be exactly 155px by 55px) using the <code>--logo flag</code>:
```shell
docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce --logo "https://www.docker.com/sites/all/themes/docker/assets/images/brand-full.svg"
```
This can also be completed via the GUI in the Portaner Settings menu
## Use your own templates
Portainer allows you to rapidly deploy containers using App Templates.
By default Portainer templates will be used but you can also define your own templates.
Note: at the moment, templates are only loaded once at first Portainer startup. If you already deployed a Portainer instance and want to use your own templates after this, youll need to clear any existing templates (default templates) via the HTTP API.
Using the <code>--templates</code> flag you can specify an URL where the template file can be accessed via HTTP.
```shell
docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce --templates http://my-host.my-domain/templates.json
```
Suggestion: You can host your template files in [Github](https://www.github.com)
## Available flags
The following CLI flags are available:
* <code>--admin-password</code>: Specify a bcrypt hashed password for the admin user
* <code>--admin-password-file</code>: Path to the file containing the password for the admin user
* <code>--bind, -p</code>: Address and port to serve Portainer (default: :9000)
* <code>--data, -d</code>: Directory where Portainer data will be stored (default: /data on Linux, C:\data on Windows)
* <code>--edge-compute</code>: Automatically enable edge-compute features
* <code>--hide-label, -l</code>: Hide containers with a specific label in the UI
* <code>--host, -H</code>: Docker daemon endpoint
* <code>--logo</code>: URL to a picture to be displayed as a logo in the UI, use Portainer logo if not specified
* <code>--snapshot-interval</code>: Time interval between two endpoint snapshot jobs expressed as a string, e.g. 30s, 5m, 1h… as supported by the time.ParseDuration method (default: 5m)
* <code>--ssl</code>: Secure Portainer instance using SSL (default: false)
* <code>--sslcert</code>: Path to the SSL certificate used to secure the Portainer instance (default: /certs/portainer.crt, C:\certs\portainer.crt on Windows)
* <code>--sslkey</code>: Path to the SSL key used to secure the Portainer instance (default: /certs/portainer.key, C:\certs\portainer.key on Windows)
* <code>--templates, -t</code>: URL to templates (apps) definitions
* <code>--tlscacert</code>: Path to the CA (default: /certs/ca.pem on Linux, C:\certs\ca.pem on Windows)
* <code>--tlscert</code>: Path to the TLS certificate file (default: /certs/cert.pem, C:\certs\cert.pem on Windows)
* <code>--tlskey</code>: Path to the TLS key (default: /certs/key.pem, C:\certs\key.pem on Windows)
* <code>--tlsverify</code>: TLS support (default: false)
* <code>--tunnel-port</code>: Specify an alternate tunnel port to use with the Edge agent. Use --tunnel-port 8001 with -p 8001:8001 to make the Edge agent communicate on port 8001
<br>
## :material-note-text: Notes
[Contribute to these docs](https://github.com/portainer/portainer-docs/blob/master/contributing.md).

View File

@ -0,0 +1,254 @@
---
hide: toc
---
# :material-kubernetes: Deploying Portainer CE in Kubernetes
To see the requirements, please, visit the page of [requirements](/v2.0/deploy/requirements).
## :fontawesome-solid-paper-plane: Portainer Deployment
---
### :material-list-status: Pre-Req Note:
Portainer requires data persistence, and as a result needs at least one storage-class available to use. Portainer will attempt to use the "default" storage class during deployment. If you do NOT have a storage class tagged as "default" the deployment will likely fail.
You can check if you have a default storage class by running:
```shell
kubectl get sc
```
and looking for a storage class with (default) after its name:
![defaultsc](assets/defaultsc.png)
```shell
kubectl patch storageclass <storage-class-name> -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
```
and replace <storage-class-name> with the name of your storage class
Example: `kubectl patch storageclass local-path -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'`
Alternatively, if installing using our helm chart you can add the following option with helm install:
```shell
--set persistence.storageClass=<storage-class-name>
```
---
<br>
**To deploy Portainer within a Kubernetes cluster, you can either use our HELM chart, or our provided manifests.**
=== "Deploy using Helm"
!!! Abstract ""
### :fontawesome-solid-server: Portainer Server Deployment
Ensure you're using at least helm v3.2, which [includes support](https://github.com/helm/helm/pull/7648) for the `--create-namespace` argument.
First, add the Portainer helm repo running the following:
```shell
helm repo add portainer https://portainer.github.io/k8s/
```
```shell
helm repo update
```
Based on how you would like expose Portainer Service, Select an option below
=== "NodePort"
Using the following command, Portainer will be available on port 30777.
```shell
helm install --create-namespace -n portainer portainer portainer/portainer
```
=== "Ingress"
Using the following command, Poratainer service will be assigned a Cluster IP. You should use this with an Ingress, see Chart Configuration Options for Ingress related options.
```shell
helm install --create-namespace -n portainer portainer portainer/portainer \
--set service.type=ClusterIP
```
??? Hint "Example Deployment with Nginx Ingress"
```shell
helm install --create-namespace -n portainer portainer portainer/portainer \
-- set service.type=ClusterIP \
-- set ingress.enabled=true \
-- set ingress.annotations='kubernetes.io/ingress.class: nginx' \
-- set ingress.hosts.host=portainer.example.io
```
=== "LoadBalancer"
Using the following command, Portainer will be available at an assigned LoadBalancer IP @ port 9000.
```shell
helm install --create-namespace -n portainer portainer portainer/portainer \
--set service.type=LoadBalancer
```
??? Note "Chart Configuration Options"
The following table lists the configurable parameters of the Portainer chart and their default values. The values file can be found under `deploy/helm/portainer/values.yaml`.
*The parameters will be keep updating.*
| Parameter | Description | Default |
| - | - | - |
| `replicaCount` | Number of Portainer service replicas (ALWAYS set to 1) | `1` |
| `image.repository` | Portainer Docker Hub repository | `portainer/portainer-ce` |
| `image.tag` | Tag for the Portainer image | `latest` |
| `image.pullPolicy` | Portainer image pulling policy | `IfNotPresent` |
| `imagePullSecrets` | If Portainer image requires to be in a private repository | `nil` |
| `nodeSelector` | Used to apply a nodeSelector to the deployment | `{}` |
| `serviceAccount.annotations` | Annotations to add to the service account | `null` |
| `serviceAccount.name` | The name of the service account to use | `portainer-sa-clusteradmin` |
| `service.type` | Service Type for the main Portainer Service; ClusterIP, NodePort and LoadBalancer | `LoadBalancer` |
| `service.httpPort` | HTTP port for accessing Portainer Web | `9000` |
| `service.httpNodePort` | Static NodePort for accessing Portainer Web. Specify only if the type is NodePort | `30777` |
| `service.edgePort` | TCP port for accessing Portainer Edge | `8000` |
| `service.edgeNodePort` | Static NodePort for accessing Portainer Edge. Specify only if the type is NodePort | `30776` |
| `service.annotations` | Annotations to add to the service | `{}` |
| `ingress.enabled` | Create an ingress for Portainer | `false` |
| `ingress.annotations` | Annotations to add to the ingress. For instane, `kubernetes.io/ingress.class: nginx` | `{}` |
| `ingress.hosts.host` | URL for Portainer Web. For instance, `portainer.example.io` | `nil` |
| `ingress.hosts.paths.path` | Path for the Portainer Web. | `/` |
| `ingress.hosts.paths.port` | Port for the Portainer Web. | `9000` |
| `ingress.tls` | TLS support on ingress. Must create a secret with TLS certificates in advance | `[]` |
| `resources` | Portainer resource requests and limits | `{}` |
| `persistence.enabled` | Whether to enable data persistence | `true` |
| `persistence.existingClaim` | Name of an existing PVC to use for data persistence | `nil` |
| `persistence.size` | Size of the PVC used for persistence | `10Gi` |
| `persistence.annotations` | Annotations to apply to PVC used for persistence | `{}` |
| `persistence.storageClass` | StorageClass to apply to PVC used for persistence | `default` |
| `persistence.accessMode` | AccessMode for persistence | `ReadWriteOnce` |
| `persistence.selector` | Selector for persistence | `nil` |
### :fontawesome-solid-laptop: Portainer Agent Only Deployment
Helm chart for Agent Only Deployments will be available soon.
In the mean time please head over to YAML Manifests tab.
=== "Deploy using YAML Manifests"
!!! Abstract ""
### :fontawesome-solid-server: Portainer Server Deployment
Based on how you would like expose Portainer Service, Select an option below
=== "NodePort"
Using the following command, Portainer will be available on port 30777.
```shell
kubectl apply -n portainer -f https://raw.githubusercontent.com/portainer/k8s/master/deploy/manifests/portainer/portainer.yaml
```
=== "LoadBalancer"
Using the following command, Portainer will be available at an assigned LoadBalancer IP @ port 9000.
```shell
kubectl apply -n portainer -f https://raw.githubusercontent.com/portainer/k8s/master/deploy/manifests/portainer/portainer-lb.yaml
```
### :fontawesome-solid-laptop: Portainer Agent Only Deployment
Choose one of the tabs below based on how you would like to expose the agent.
=== "NodePort"
Run the following command to deploy the Agent in your Kubernetes Cluster, agent will be available on port 30778.
```shell
kubectl apply -n portainer -f https://downloads.portainer.io/portainer-agent-k8s-nodeport.yaml
```
=== "LoadBalancer"
Run the following command to deploy the Agent in your Kubernetes Cluster, agent will be available on LoadBalancer assigned IP @ port 9001
```shell
kubectl apply -n portainer -f https://downloads.portainer.io/portainer-agent-k8s-lb.yaml
```
=== "Deploy on Windows WSL"
!!! Abstract ""
You can deploy Portainer in a Kubernetes environment in Windows using Docker Desktop.
!!! Note
This scenario is for testing purpose only.
### Enable Kubernetes in Docker Desktop
To enable Kubernetes in Docker Desktop, you need to open the dashboard of Docker Desktop. Right click the Docker icon in the system tray and click "dashboard"
![dashboard](assets/windows10-1.png)
Click Settings:
![settings](assets/windows10-2.png)
1. Select Kubernetes 2. Select 'Enable Kubernetes' 3. Click 'Apply and Restart'.
![kubernetes](assets/windows10-3.png)
After a few minutes, you will see that Kubernetes is running:
![kubernetes_running](assets/windows10-4.png)
### :fontawesome-solid-server: Portainer Server Deployment
Based on how you would like expose Portainer Service, Select an option below
=== "NodePort"
Using the following command, Portainer will be available on port 30777.
```shell
kubectl apply -n portainer -f https://raw.githubusercontent.com/portainer/k8s/master/deploy/manifests/portainer/portainer.yaml
```
=== "LoadBalancer"
Using the following command, Portainer will be available at an assigned LoadBalancer IP @ port 9000.
```shell
kubectl apply -n portainer -f https://raw.githubusercontent.com/portainer/k8s/master/deploy/manifests/portainer/portainer-lb.yaml
```
### :fontawesome-solid-laptop: Portainer Agent Only Deployment
Choose one of the tabs below based on how you would like to expose the agent.
=== "NodePort"
Run the following command to deploy the Agent in your Kubernetes Cluster, agent will be available on port 30778.
```shell
kubectl apply -n portainer -f https://downloads.portainer.io/portainer-agent-k8s-nodeport.yaml
```
=== "LoadBalancer"
Run the following command to deploy the Agent in your Kubernetes Cluster, agent will be available on LoadBalancer assigned IP @ port 9001
```shell
kubectl apply -n portainer -f https://downloads.portainer.io/portainer-agent-k8s-lb.yaml
```
---
???+ Tip "Regarding Persisting Data"
The charts/manifests will create a persistent volume for storing Portainer data, using the default StorageClass.
In some Kubernetes clusters (microk8s), the default Storage Class simply creates hostPath volumes, which are not explicitly tied to a particular node. In a multi-node cluster, this can create an issue when the pod is terminated and rescheduled on a different node, "leaving" all the persistent data behind and starting the pod with an "empty" volume.
While this behaviour is inherently a limitation of using hostPath volumes, a suitable workaround is to use add a nodeSelector to the deployment, which effectively "pins" the portainer pod to a particular node.
The nodeSelector can be added in the following ways:
1. Edit your own values.yaml and set the value of nodeSelector like this:
nodeSelector: kubernetes.io/hostname: \<YOUR NODE NAME>
2. Explicictly set the target node when deploying/updating the helm chart on the CLI, by including `--set nodeSelector.kubernetes.io/hostname=<YOUR NODE NAME>`
3. If you've deployed Portainer via manifests, without Helm, run the following one-liner to "patch" the deployment, forcing the pod to always be scheduled on the node it's currently running on:
kubectl patch deployments -n portainer portainer -p '{"spec": {"template": {"spec": {"nodeSelector": {"kubernetes.io/hostname": "'$(kubectl get pods -n portainer -o jsonpath='{ ..nodeName }')'"}}}}}' || (echo Failed to identify current node of portainer pod; exit 1)
<br>
## :material-note-text: Notes
[Contribute to these docs](https://github.com/portainer/portainer-docs/blob/master/contributing.md).
<!-- {{ snippet('https://github.com/portainer/k8s.git', 'charts/portainer/README.md', '# Chart Configuration') }} -->

View File

@ -0,0 +1,160 @@
---
hide: toc
---
# :fontawesome-brands-docker: Deploying Portainer CE in Docker Swarm
Portainer is comprised of two elements, the Portainer Server, and the Portainer Agent. Both elements run as lightweight Docker containers on a Docker engine or within a Swarm cluster. Due to the nature of Docker, there are many possible deployment scenarios, however, we have detailed the most common below. Please use the scenario that matches your configuration.
Note that the recommended deployment mode when using Swarm is using the Portainer Agent.
By default, Portainer will expose the UI over the port 9000 and expose a TCP tunnel server over the port 8000. The latter is optional and is only required if you plan to use the Edge compute features with Edge agents.
To see the requirements, please, visit the page of [requirements](/v2.0/deploy/requirements).
## :fontawesome-solid-paper-plane: Portainer Deployment
Use the following Docker commands to deploy the Portainer Server; note the agent is not needed on standalone hosts, however it does provide additional functionality if used (see Portainer and agent scenario below):
=== "Docker Swarm on Linux"
!!! Abstract ""
### :fontawesome-solid-server: Portainer Server Deployment
Deploying Portainer and the Portainer Agent to manage a Swarm cluster is easy! You can directly deploy Portainer as a service in your Docker cluster. Note that this method will automatically deploy a single instance of the Portainer Server, and deploy the Portainer Agent as a global service on every node in your cluster.
```shell
curl -L https://downloads.portainer.io/portainer-agent-stack.yml -o portainer-agent-stack.yml
```
```shell
docker stack deploy -c portainer-agent-stack.yml portainer
```
<b>Note</b>: By default this stack doesn't enable Host Management Features, you need to enable from the UI of Portainer.
### :fontawesome-solid-laptop: Portainer Agent Only Deployment
Deploy Portainer Agent on a remote LINUX Swarm Cluster as a Swarm Service, run this command on a manager node in the remote cluster.
First create the network:
```shell
docker network create portainer_agent_network
```
The following step is deploy the Agent:
```shell
docker service create --name portainer_agent --network portainer_agent_network --publish mode=host,target=9001,published=9001 -e AGENT_CLUSTER_ADDR=tasks.portainer_agent --mode global --mount type=bind,src=//var/run/docker.sock,dst=/var/run/docker.sock --mount type=bind,src=//var/lib/docker/volumes,dst=/var/lib/docker/volumes --mount type=bind,src=/,dst=/host portainer/agent
```
=== "Docker Swarm on Windows WSL"
!!! Abstract ""
Before you can deploy Portainer in Docker Swarm running in Windows, you need to install WSL. [Read this guide to know more about WSL/WSL2](https://docs.microsoft.com/en-us/windows/wsl/install-win10)
Use the following Docker Swarmcommands to deploy the Portainer Server; note the agent is not needed on standalone hosts, however it does provide additional functionality if used (see portainer and agent scenario below):
### :fontawesome-solid-server: Portainer Server Deployment
Deploying Portainer and the Portainer Agent to manage a Swarm cluster is easy! You can directly deploy Portainer as a service in your Docker cluster. Note that this method will automatically deploy a single instance
of the Portainer Server, and deploys the Portainer Agent as a global service on every node in your cluster.
Remember to initiate the Docker Swarm mode when you use Docker Desktop. You can do this running the following command:
```shell
docker swarm init
```
The terminal will reply with this:
```shell
Swarm initialized: current node (15gbf4d66mvzk3die00sgirpf) is now a manager.
To add a worker to this swarm, run the following command:
docker swarm join --token SWMTKN-1-096qbnf2b9yywagu5ht3731zlpkeqazgctffolntsiljfp0m34-c4snnxplgwq2bd1ohta8k48b9 192.168.65.3:2377
To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.
```
Once this is done, you can continue with the installation running the following command:
```shell
curl -L https://downloads.portainer.io/portainer-agent-stack.yml -o portainer-agent-stack.yml
```
```shell
docker stack deploy -c portainer-agent-stack.yml portainer
```
### :fontawesome-solid-laptop: Portainer Agent Only Deployment
Deploy Portainer Agent on a Swarm Cluster as a Swarm Service, run this command in a manager node in the cluster.
```shell
docker service create --name portainer_agent --network portainer_agent_network --publish mode=host,target=9001,published=9001 -e AGENT_CLUSTER_ADDR=tasks.portainer_agent --mode global --mount type=bind
src=//var/run/docker.sock,dst=/var/run/docker.sock --mount type=bind,src=//var/lib/docker/volumes,dst=/var/lib/docker/volumes -mount type=bind,src=/,dst=/host portainer/agent
```
=== "Docker Swarm on Windows Container Service"
!!! Abstract ""
To run Portainer in a Windows Server/Desktop Environment, you need to create exceptions in the firewall. These, can be easy added through PowerShell, running the following commands:
```shell
netsh advfirewall firewall add rule name="cluster_management" dir=in action=allow protocol=TCP localport=2377
```
```shell
netsh advfirewall firewall add rule name="node_communication_tcp" dir=in action=allow protocol=TCP localport=7946
```
```shell
netsh advfirewall firewall add rule name="node_communication_udp" dir=in action=allow protocol=UDP localport=7946
```
```shell
netsh advfirewall firewall add rule name="overlay_network" dir=in action=allow protocol=UDP localport=4789
```
```shell
netsh advfirewall firewall add rule name="swarm_dns_tcp" dir=in action=allow protocol=TCP localport=53
```
```shell
netsh advfirewall firewall add rule name="swarm_dns_udp" dir=in action=allow protocol=UDP localport=53
```
You also need to install Windows Container Host Service and Install Docker.
```shell
Enable-WindowsOptionalFeature -Online -FeatureName containers -All
```
```shell
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
```
```shell
Install-Package -Name docker -ProviderName DockerMsftProvider
```
Lastly, you need to restart your Windows Server. After it has restarted, you're ready to deploy Portainer.
### :fontawesome-solid-server: Portainer Server Deployment
You can use our YML manifest to run Portainer in Windows using Windows Containers. In Powershell, run:
```PowerShell
curl https://downloads.portainer.io/portainer_windows_stack.yml -o portainer_windows_stack.yml
```
```PowerShell
docker stack deploy --compose-file=portainer_windows_stack.yml portainer
```
Now, you can navigate to http://localhost:9000 or the IP of the server and start using Portainer.
### :fontawesome-solid-laptop: Portainer Agent Only Deployment
To run Portainer Agent in a Windows Container scenario, you need to execute the following commands:
```PowerShell
curl -L https://downloads.portainer.io/agent-stack-windows.yml -o agent-stack-windows.yml && docker stack deploy --compose-file=agent-stack-windows.yml portainer-agent
```
<br>
## :material-note-text: Notes
[Contribute to these docs](https://github.com/portainer/portainer-docs/blob/master/contributing.md).

29
docs/v2.0/deploy/roles.md Normal file
View File

@ -0,0 +1,29 @@
# Description of Roles
Portainer Business come with Role-Based Access Control features that refines the access privileges available natively within Portainer. The RBAC feature allows you to create fine-grained access for users across all resources and all endpoints defined within Portainer.
## Basics Understanding
* Role is a predefined set of privileges.
* Privileges define rights to perform actions.
* Users are assigned roles and each role has specific privileges.
* To assign privileges, you pair a user or team with a role and associate that pairing with an endpoint or endpoint group.
* A single user or team can have different roles for different endpoints in the Portainer inventory.
## Describing Roles
There are four types of roles:
* Endpoint Administrator: has complete control over the resources deployed within a given endpoint, but is not able to make any changes to the infrastructure that underpins an endpoint (i.e. no host management), nor are they able to make any changes to Portainer internal settings.
* Helpdesk: has read-only access over the resources deployed within a given endpoint but is not able to make any changes to any resource, nor open a console to a container, or make changes to a containers volumes.
* Standard User: has complete control over the resources that a user deploys, or if the user is a member of a team, complete control over the resources that users of that team deploy.
* Read-Only User: has read-only access over the resources they are entitled to see (resources created by members of their team, and public resources).
* The Administrator role sits outside of these four roles, and effectively acts as a “Global Admin”. A user assigned this role has complete control over Portainer settings, and all resources on every endpoint under Portainer control.
# Notes
[Contribute to these docs](https://github.com/portainer/portainer-docs/blob/master/contributing.md).

View File

@ -0,0 +1,271 @@
---
title: Combined Instructions Example
---
# :fontawesome-brands-docker: Deploying Portainer in Docker
Portainer is comprised of two elements, the Portainer Server, and the Portainer Agent. Both elements run as lightweight Docker containers on a Docker engine or within a Swarm cluster. Due to the nature of Docker, there are many possible deployment scenarios, however, we have detailed the most common below. Please use the scenario that matches your configuration.
Note that the recommended deployment mode when using Swarm is using the Portainer Agent.
By default, Portainer will expose the UI over the port 9000 and expose a TCP tunnel server over the port 8000. The latter is optional and is only required if you plan to use the Edge compute features with Edge agents.
To see the requirements, please, visit the page of [requirements](/v2.0/deploy/requirements).
## :fontawesome-solid-paper-plane: Portainer Deployment
=== "Docker on Linux"
### :fontawesome-solid-server: Portainer Server Deployment
Use the following Docker commands to deploy the Portainer Server; note the agent is not needed on standalone hosts, however it does provide additional functionality if used (see Portainer and agent scenario below):
```shell
docker volume create portainer_data
```
=== "Community Edition"
```shell
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
```
=== "Business Edition"
```shell
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ee:latest
```
### :fontawesome-solid-laptop: Portainer Agent Only Deployment
Run the following command to deploy the Agent in your Docker host.
===! "Community Edition"
```shell
docker run -d -p 9001:9001 --name portainer_agent --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/volumes:/var/lib/docker/volumes portainer/agent
```
=== "Business Edition"
```shell
docker run -d -p 9001:9001 --name portainer_agent --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/volumes:/var/lib/docker/volumes portainer/agent:2.0.0
```
=== "Docker on Windows WSL"
Before you can deploy Portainer in Docker Standalone running in Windows, you need to install WSL. [Read this guide to know more about WSL/WSL2](https://docs.microsoft.com/en-us/windows/wsl/install-win10)
Use the following Docker commands to deploy the Portainer Server; note the agent is not needed on standalone hosts, however it does provide additional functionality if used (see portainer and agent scenario below):
### :fontawesome-solid-server: Portainer Server Deployment
```shell
docker volume create portainer_data
```
```shell
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
```
### :fontawesome-solid-laptop: Portainer Agent Only Deployment
Run the following command to deploy the Agent in your Docker host.
```shell
docker run -d -p 9001:9001 --name portainer_agent --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/volumes:/var/lib/docker/volumes portainer/agent
```
=== "Docker on Windows Container Service"
To run Portainer in a Windows Server/Desktop Environment, you need to create exceptions in the firewall. These, can be easy added trough PowerShell, running the following commands:
```shell
netsh advfirewall firewall add rule name="cluster_management" dir=in action=allow protocol=TCP localport=2377
```
```shell
netsh advfirewall firewall add rule name="node_communication_tcp" dir=in action=allow protocol=TCP localport=7946
```
```shell
netsh advfirewall firewall add rule name="node_communication_udp" dir=in action=allow protocol=UDP localport=7946
```
```shell
netsh advfirewall firewall add rule name="overlay_network" dir=in action=allow protocol=UDP localport=4789
```
```shell
netsh advfirewall firewall add rule name="swarm_dns_tcp" dir=in action=allow protocol=TCP localport=53
```
```shell
netsh advfirewall firewall add rule name="swarm_dns_udp" dir=in action=allow protocol=UDP localport=53
```
You also need to install Windows Container Host Service and Install Docker.
```shell
Enable-WindowsOptionalFeature -Online -FeatureName containers -All
```
```shell
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
```
```shell
Install-Package -Name docker -ProviderName DockerMsftProvider
```
Lastly, you need to restart your Windows Server. After it has restarted, you're ready to deploy Portainer.
### :fontawesome-solid-server: Portainer Server Deployment
```shell
docker volume create portainer_data
```
```shell
docker run -d -p 9000:9000 --name portainer --restart always -v \\.\pipe\docker_engine:\\.\pipe\docker_engine -v portainer_data:C:\data portainer/portainer-ce
```
Now, you can navigate to http://localhost:9000 or the IP of the server and start using Portainer.
### :fontawesome-solid-laptop: Portainer Agent Only Deployment
To run Portainer Agent in a Windows Container scenario, you need to execute the following commands:
```shell
docker run -d -p 9001:9001 --name portainer_agent --restart=always -v \\.\pipe\docker_engine:\\.\pipe\docker_engine portainer/agent
```
??? Tip "Advanced Options"
# CLI Configuration Options
Portainer can be easily tuned using CLI flags.
## Admin password
### From the command line
Portainer allows you to specify a bcrypt encrypted password from the command line for the admin account. You need to generate the bcrypt encrypted password first.
You can generate the encrypted password with the following command if you have installed apache2-utils package:
```shell
htpasswd -nb -B admin "your-password" | cut -d ":" -f 2
```
If your system does not have the mentioned command, you can run a container to run the command:
```shell
docker run --rm httpd:2.4-alpine htpasswd -nbB admin "your-password" | cut -d ":" -f 2
```
To specify the admin password from the command line, start Portainer with the <code>--admin-password</code> flag:
```shell
docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce --admin-password='$2y$05$8oz75U8m5tI/xT4P0NbSHeE7WyRzOWKRBprfGotwDkhBOGP/u802u'
```
### Inside a file
You can also store the plaintext password inside a file and use the <code>--admin-password-file</code> flag:
Add your password to a file running the following command:
```shell
echo -n mypassword > /tmp/portainer_password
```
Now you can start the Portainer container by running:
```shell
docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/portainer_password:/tmp/portainer_password portainer/portainer-ce --admin-password-file /tmp/portainer_password
```
This works well with Docker Swarm and Docker secrets too:
```shell
echo -n mypassword | docker secret create portainer-pass -
```
```shell
docker service create \
--name portainer \
--secret portainer-pass \
--publish 9000:9000 \
--publish 8000:8000 \
--replicas=1 \
--constraint 'node.role == manager' \
--mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
portainer/portainer-ce \
--admin-password-file '/run/secrets/portainer-pass' \
-H unix:///var/run/docker.sock
```
Note: This will automatically create an administrator account called admin with the specified password.
## Hiding specific containers
Portainer allows you to hide containers with a specific label by using the -l flag.
For example, take a container started with the label owner=acme (note that this is an example label, you can define your own labels):
```shell
docker run -d --label owner=acme nginx
```
To hide this container, simply add the -l owner=acme option on the CLI when starting Portainer:
```shell
docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce -l owner=acme
```
Note that the -l flag can be repeated multiple times to specify multiple labels:
```shell
docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce -l owner=acme -l service=secret
```
## Use your own logo
You do not like our logo? Want to make Portainer more corporate? Dont worry, you can easily switch for an external logo (it must be exactly 155px by 55px) using the <code>--logo flag</code>:
```shell
docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce --logo "https://www.docker.com/sites/all/themes/docker/assets/images/brand-full.svg"
```
This can also be completed via the GUI in the Portaner Settings menu
## Use your own templates
Portainer allows you to rapidly deploy containers using App Templates.
By default Portainer templates will be used but you can also define your own templates.
Note: at the moment, templates are only loaded once at first Portainer startup. If you already deployed a Portainer instance and want to use your own templates after this, youll need to clear any existing templates (default templates) via the HTTP API.
Using the <code>--templates</code> flag you can specify an URL where the template file can be accessed via HTTP.
```shell
docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce --templates http://my-host.my-domain/templates.json
```
Suggestion: You can host your template files in [Github](https://www.github.com)
## Available flags
The following CLI flags are available:
* <code>--admin-password</code>: Specify a bcrypt hashed password for the admin user
* <code>--admin-password-file</code>: Path to the file containing the password for the admin user
* <code>--bind, -p</code>: Address and port to serve Portainer (default: :9000)
* <code>--data, -d</code>: Directory where Portainer data will be stored (default: /data on Linux, C:\data on Windows)
* <code>--edge-compute</code>: Automatically enable edge-compute features
* <code>--hide-label, -l</code>: Hide containers with a specific label in the UI
* <code>--host, -H</code>: Docker daemon endpoint
* <code>--logo</code>: URL to a picture to be displayed as a logo in the UI, use Portainer logo if not specified
* <code>--snapshot-interval</code>: Time interval between two endpoint snapshot jobs expressed as a string, e.g. 30s, 5m, 1h… as supported by the time.ParseDuration method (default: 5m)
* <code>--ssl</code>: Secure Portainer instance using SSL (default: false)
* <code>--sslcert</code>: Path to the SSL certificate used to secure the Portainer instance (default: /certs/portainer.crt, C:\certs\portainer.crt on Windows)
* <code>--sslkey</code>: Path to the SSL key used to secure the Portainer instance (default: /certs/portainer.key, C:\certs\portainer.key on Windows)
* <code>--templates, -t</code>: URL to templates (apps) definitions
* <code>--tlscacert</code>: Path to the CA (default: /certs/ca.pem on Linux, C:\certs\ca.pem on Windows)
* <code>--tlscert</code>: Path to the TLS certificate file (default: /certs/cert.pem, C:\certs\cert.pem on Windows)
* <code>--tlskey</code>: Path to the TLS key (default: /certs/key.pem, C:\certs\key.pem on Windows)
* <code>--tlsverify</code>: TLS support (default: false)
* <code>--tunnel-port</code>: Specify an alternate tunnel port to use with the Edge agent. Use --tunnel-port 8001 with -p 8001:8001 to make the Edge agent communicate on port 8001
## :material-note-text: Notes
[Contribute to these docs](https://github.com/portainer/portainer-docs/blob/master/contributing.md).

View File

@ -1,4 +1,4 @@
# Upgrade a Standalone Docker Deployment
# :fontawesome-brands-docker: Upgrade a Standalone Docker Deployment
### Docker Standalone
@ -82,5 +82,5 @@ docker run -d -p 9001:9001 --name portainer_agent --restart=always --pull=always
```
## Notes
## :material-note-text: Notes
[Contribute to these docs](https://github.com/portainer/portainer-docs/blob/master/contributing.md).

View File

@ -1,4 +1,4 @@
# Upgrade Kubernetes Deployment
# :material-kubernetes: Upgrade Kubernetes Deployment
Steps to upgrade Portainer and or Portainer agent deployed into Kubernetes. Upgrade method depends on the original install method used.
@ -72,5 +72,5 @@ kubectl apply -n portainer -f https://raw.githubusercontent.com/portainer/k8s/ma
Now you can go to portainer url and login. You should notice that the bottom left corner looks different than it did before. There is no more update nag and the version is no longer shown next to the Portainer logo.
## Notes
## :material-note-text: Notes
[Contribute to these docs](https://github.com/portainer/portainer-docs/blob/master/contributing.md).

View File

@ -1,4 +1,4 @@
# Upgrade a Docker Swarm Deployment
# :fontawesome-brands-docker: Upgrade a Docker Swarm Deployment
### Docker Swarm
Steps to upgrade Portainer and or Portainer agent deployed into Dcoker Swarm as a service.
@ -21,5 +21,5 @@ That will deploy the newest version of Portainer on your system, using the persi
Now you can go to http://your-server-address:9000 and login. You should notice that the bottom left corner looks different than it did before. There is no more update nag and the version is no longer shown next to the Portainer logo.
## Notes
## :material-note-text: Notes
[Contribute to these docs](https://github.com/portainer/portainer-docs/blob/master/contributing.md).

View File

@ -7,11 +7,9 @@ You can find Requirements for different versions of Portainer [here](../../deplo
Upgrade Instructions for different deployments below...
[Docker](../upddocker/)
[DockerSwarm](../updswarm/)
[Kubernetes](../updk8s/)
[Docker](../upddocker/){: .md-button }
[DockerSwarm](../updswarm/){: .md-button }
[Kubernetes](../updk8s/){: .md-button }
## Notes

View File

@ -2,21 +2,24 @@ site_name: Documentation
google_analytics: ['G-N7CY67ZGSW', 'documentation.portainer.io']
nav:
- Home: index.md
- Portainer Community 2.1:
- Admin Guide:
- Deploying Portainer:
- Quick Start: quickstart.md
- Install Guide:
- Community Edition:
- 'Requirements' : 'v2.0/deploy/requirements.md'
- 'CLI Options' : 'v2.0/deploy/cli.md'
- 'Deploying on Linux' : 'v2.0/deploy/linux.md'
- 'Deploying on Windows Server' : 'v2.0/deploy/windowsserver.md'
- 'Deploying on Windows 10' : 'v2.0/deploy/windows10.md'
- 'Docker' : 'v2.0/deploy/ceinstalldocker.md'
- 'Docker Swarm' : 'v2.0/deploy/ceinstallswarm.md'
- 'Kubernetes' : 'v2.0/deploy/ceinstallk8s.md'
- 'Using SSL with Portainer' : 'v2.0/deploy/ssl.md'
- 'Initial Setup' : 'v2.0/deploy/initial.md'
- Upgrading Portainer:
- 'Upgrade Path': 'v2.0/upgrade/upgrade.md'
- 'Upgrading on Docker': 'v2.0/upgrade/upddocker.md'
- 'Upgrading on DockerSwarm': 'v2.0/upgrade/updswarm.md'
- 'Upgrading on Kubernetes': 'v2.0/upgrade/updk8s.md'
- Business Edition:
- 'Requirements' : 'v2.0-be/deploy/requirements.md'
- 'Docker' : 'v2.0-be/deploy/beinstalldocker.md'
- 'Docker Swarm' : 'v2.0-be/deploy/beinstallswarm.md'
- 'Kubernetes' : 'v2.0-be/deploy/beinstallk8s.md'
- 'Using SSL with Portainer' : 'v2.0-be/deploy/ssl.md'
- 'Initial Setup' : 'v2.0-be/deploy/initial.md'
- Admin Guide:
- Community Edition:
- Managing Endpoints:
- 'Add Local Endpoint' : 'v2.0/endpoints/local.md'
- 'Add Docker Endpoint' : 'v2.0/endpoints/docker.md'
@ -53,7 +56,56 @@ nav:
- 'Nginx' : 'v2.0/ad/nginx/rp-nginx.md'
- FAQs : 'v2.0/troubleshooting/troubleshooting.md'
- Deprecated and Removed Features : 'v2.0/troubleshooting/deprecated.md'
- User Guide:
- Business Edition:
- Managing Endpoints:
- 'Add Local Endpoint' : 'v2.0-be/endpoints/local.md'
- 'Add Docker Endpoint' : 'v2.0-be/endpoints/docker.md'
- 'Add Docker Swarm Endpoint' : 'v2.0-be/endpoints/swarm.md'
- 'Add Kubernetes Endpoint' : 'v2.0-be/endpoints/kubernetes.md'
- 'Add Edge Endpoint' : 'v2.0-be/endpoints/edge.md'
- 'Add ACI Endpoint' : 'v2.0-be/endpoints/aci.md'
- 'Creating Endpoints Groups and Endpoint Tags' : 'v2.0-be/endpoints/groupstags.md'
- 'Managing Endpoints Access' : 'v2.0-be/endpoints/access.md'
- 'Add Endpoint through Portainer API' : 'v2.0-be/endpoints/api.md'
- Licensing:
- 'Add or remove license key' : 'v2.0-be/licensing/licensing.md'
- Authentication Sources:
- 'Automatic User Provisioning' : 'v2.0-be/auth/auto.md'
- 'LDAP' : 'v2.0-be/auth/ldap.md'
- 'Active Directory' : 'v2.0-be/auth/ad.md'
- 'OAuth' : 'v2.0-be/auth/oauth.md'
- 'Internal' : 'v2.0-be/auth/internal.md'
- Managing Users & Teams:
- 'RBAC Overview' : 'v2.0-be/users/roles.md'
- 'Effective access viewer' : 'v2.0-be/users/viewer.md'
- 'Create a User' : 'v2.0-be/users/create.md'
- 'Create a Team' : 'v2.0-be/users/create-team.md'
- 'Promote a User as Admin' : 'v2.0-be/users/promoting.md'
- 'Add a User to a Team' : 'v2.0-be/users/user-team.md'
- 'Reset User Password' : 'v2.0-be/users/reset-user.md'
- 'Reset Administrator Password' : 'v2.0-be/users/reset-admin.md'
- Registries:
- 'Registry Management Overview' : 'v2.0-be/registries/description.md'
- 'Connect to a Registry' : 'v2.0-be/registries/connect.md'
- 'Enable Docker Hub Authentication' : 'v2.0-be/registries/auth-docker-hub.md'
- Configuring Settings:
- 'Enable use of external load balancer' : 'v2.0-be/settings/lb.md'
- 'Allow/Disallow over-commitment of resources' : 'v2.0-be/settings/overcommit.md'
- 'Limit usage of default namespace' : 'v2.0-be/settings/namespaces.md'
- 'Security Options' : 'v2.0-be/settings/security.md'
- 'Enable Edge Computing' : 'v2.0-be/settings/edge.md'
- 'App Templates' : 'v2.0-be/settings/apps.md'
- 'Enable Host Management Features' : 'v2.0-be/settings/host_management.md'
- Downgrading:
- 'Downgrade from BE to CE': 'v2.0-be/downgrade/be-to-ce.md'
- Advanced Deployments:
- 'Using Portainer with Reverse Proxies':
- 'Traefik' : 'v2.0-be/ad/traefik/rp-traefik.md'
- 'Nginx' : 'v2.0-be/ad/nginx/rp-nginx.md'
- FAQs : 'v2.0-be/troubleshooting/troubleshooting.md'
- Deprecated and Removed Features : 'v2.0-be/troubleshooting/deprecated.md'
- User Guide:
- Community Edition:
- Docker & Docker Swarm:
- 'Stacks':
- 'Add/Create a Stack' : 'v2.0/stacks/create.md'
@ -127,64 +179,7 @@ nav:
- 'Add a Stack' : 'v2.0/edge/stacks.md'
- 'Add a Job' : 'v2.0/edge/jobs/add.md'
- 'Managing Edge Groups' : 'v2.0/edge/groups.md'
- Portainer Business 2.0:
- Admin Guide:
- Deploying Portainer:
- 'Requirements' : 'v2.0-be/deploy/requirements.md'
- 'CLI Options' : 'v2.0-be/deploy/cli.md'
- 'Deploying on Linux' : 'v2.0-be/deploy/linux.md'
- 'Deploying on Windows Server' : 'v2.0-be/deploy/windowsserver.md'
- 'Deploying on Windows 10' : 'v2.0-be/deploy/windows10.md'
- 'Using SSL with Portainer' : 'v2.0-be/deploy/ssl.md'
- 'Initial Setup' : 'v2.0-be/deploy/initial.md'
- Managing Endpoints:
- 'Add Local Endpoint' : 'v2.0-be/endpoints/local.md'
- 'Add Docker Endpoint' : 'v2.0-be/endpoints/docker.md'
- 'Add Docker Swarm Endpoint' : 'v2.0-be/endpoints/swarm.md'
- 'Add Kubernetes Endpoint' : 'v2.0-be/endpoints/kubernetes.md'
- 'Add Edge Endpoint' : 'v2.0-be/endpoints/edge.md'
- 'Add ACI Endpoint' : 'v2.0-be/endpoints/aci.md'
- 'Creating Endpoints Groups and Endpoint Tags' : 'v2.0-be/endpoints/groupstags.md'
- 'Managing Endpoints Access' : 'v2.0-be/endpoints/access.md'
- 'Add Endpoint through Portainer API' : 'v2.0-be/endpoints/api.md'
- Licensing:
- 'Add or remove license key' : 'v2.0-be/licensing/licensing.md'
- Authentication Sources:
- 'Automatic User Provisioning' : 'v2.0-be/auth/auto.md'
- 'LDAP' : 'v2.0-be/auth/ldap.md'
- 'Active Directory' : 'v2.0-be/auth/ad.md'
- 'OAuth' : 'v2.0-be/auth/oauth.md'
- 'Internal' : 'v2.0-be/auth/internal.md'
- Managing Users & Teams:
- 'RBAC Overview' : 'v2.0-be/users/roles.md'
- 'Effective access viewer' : 'v2.0-be/users/viewer.md'
- 'Create a User' : 'v2.0-be/users/create.md'
- 'Create a Team' : 'v2.0-be/users/create-team.md'
- 'Promote a User as Admin' : 'v2.0-be/users/promoting.md'
- 'Add a User to a Team' : 'v2.0-be/users/user-team.md'
- 'Reset User Password' : 'v2.0-be/users/reset-user.md'
- 'Reset Administrator Password' : 'v2.0-be/users/reset-admin.md'
- Registries:
- 'Registry Management Overview' : 'v2.0-be/registries/description.md'
- 'Connect to a Registry' : 'v2.0-be/registries/connect.md'
- 'Enable Docker Hub Authentication' : 'v2.0-be/registries/auth-docker-hub.md'
- Configuring Settings:
- 'Enable use of external load balancer' : 'v2.0-be/settings/lb.md'
- 'Allow/Disallow over-commitment of resources' : 'v2.0-be/settings/overcommit.md'
- 'Limit usage of default namespace' : 'v2.0-be/settings/namespaces.md'
- 'Security Options' : 'v2.0-be/settings/security.md'
- 'Enable Edge Computing' : 'v2.0-be/settings/edge.md'
- 'App Templates' : 'v2.0-be/settings/apps.md'
- 'Enable Host Management Features' : 'v2.0-be/settings/host_management.md'
- Downgrading:
- 'Downgrade from BE to CE': 'v2.0-be/downgrade/be-to-ce.md'
- Advanced Deployments:
- 'Using Portainer with Reverse Proxies':
- 'Traefik' : 'v2.0-be/ad/traefik/rp-traefik.md'
- 'Nginx' : 'v2.0-be/ad/nginx/rp-nginx.md'
- FAQs : 'v2.0-be/troubleshooting/troubleshooting.md'
- Deprecated and Removed Features : 'v2.0-be/troubleshooting/deprecated.md'
- User Guide:
- Business Edition:
- Docker & Docker Swarm:
- 'Stacks':
- 'Add/Create a Stack' : 'v2.0-be/stacks/create.md'
@ -260,7 +255,12 @@ nav:
- 'Managing Edge Groups' : 'v2.0-be/edge/groups.md'
- Registries:
- 'Browse a Registry' : 'v2.0-be/registries/browse.md'
- 'Manage a Registry' : 'v2.0-be/registries/manage.md'
- 'Manage a Registry' : 'v2.0-be/registries/manage.md'
- Upgrading Portainer:
- 'Upgrade Path': 'v2.0/upgrade/upgrade.md'
- 'Upgrading on Docker': 'v2.0/upgrade/upddocker.md'
- 'Upgrading on DockerSwarm': 'v2.0/upgrade/updswarm.md'
- 'Upgrading on Kubernetes': 'v2.0/upgrade/updk8s.md'
- FAQs : 'v2.0-be/troubleshooting/troubleshooting.md'
- Videos : 'https://www.youtube.com/channel/UC7diMJcrULjDseq5yhSUZgg/videos'
- Older Releases:
@ -285,7 +285,8 @@ extra_css:
- css/extra.css
theme:
font:
text: raleway
text: Raleway #Fira Sans
#code: Fira Code
features:
- instant
logo: assets/logo.png
@ -295,6 +296,20 @@ theme:
primary: light-blue
repo_name: portainer/portainer
repo_url: https://github.com/portainer/portainer-docs
markdown_extensions:
- attr_list
- admonition
- toc:
toc_depth: 0
- pymdownx.tabbed
- pymdownx.superfences
- pymdownx.details
- fontawesome_markdown
- meta
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
extra:
social:
- icon: fontawesome/brands/twitter