mirror of https://github.com/docker/docs.git
				
				
				
			First draft of CNI plugin topic (#494)
* First draft of CNI plugin topic * Fix for kubectl dependency issue
This commit is contained in:
		
							parent
							
								
									170018b0c9
								
							
						
					
					
						commit
						22c6f96c54
					
				|  | @ -1759,6 +1759,8 @@ manuals: | |||
|         path: /ee/ucp/kubernetes/deploy-ingress-controller/ | ||||
|       - title: Create a service account for a Kubernetes app | ||||
|         path: /ee/ucp/kubernetes/create-service-account/ | ||||
|       - title: Install a CNI plugin | ||||
|         path: /ee/ucp/kubernetes/install-cni-plugin/ | ||||
|     - title: API reference | ||||
|       path: /reference/ucp/3.0/api/ | ||||
|       nosync: true | ||||
|  |  | |||
|  | @ -87,6 +87,14 @@ To install UCP: | |||
|     To find what other options are available in the install command, check the | ||||
|     [reference documentation](/reference/ucp/3.0/cli/install.md). | ||||
| 
 | ||||
| > Custom CNI plugins | ||||
| > | ||||
| > If you want to use a third-party Container Networking Interface (CNI) plugin, | ||||
| > like Flannel or Weave, modify the previous command line to include the  | ||||
| > `--cni-installer-url` option. Learn how to | ||||
| > [install a CNI plugin](../../kubernetes/install-cni-plugin.md). | ||||
| {: important} | ||||
| 
 | ||||
| ## Step 5: License your installation | ||||
| 
 | ||||
| Now that UCP is installed, you need to license it. | ||||
|  |  | |||
|  | @ -0,0 +1,70 @@ | |||
| --- | ||||
| title: Install a CNI plugin | ||||
| description: Learn how to install a Container Networking Interface plugin on Docker Universal Control Plane. | ||||
| keywords: ucp, cli, administration, kubectl, Kubernetes, cni, Container Networking Interface, flannel, weave | ||||
| ui_tabs: | ||||
| - version: ucp-3.0 | ||||
|   orhigher: false | ||||
| next_steps: | ||||
| - path: ../admin/install/ | ||||
|   title: Install UCP for production | ||||
| - path: ../kubernetes/ | ||||
|   title: Deploy a workload to a Kubernetes cluster | ||||
| --- | ||||
| 
 | ||||
| {% if include.version=="ucp-3.0" %} | ||||
| 
 | ||||
| With Docker Universal Control Plane, you can install a third-party Container | ||||
| Networking Interface (CNI) plugin when you install UCP, by using the | ||||
| `--cni-installer-url` option. By default, Docker EE installs the built-in | ||||
| [Calico](https://github.com/projectcalico/cni-plugin) plugin, but you can | ||||
| override the default and install a plugin of your choice, | ||||
| like [Flannel](https://github.com/coreos/flannel) or | ||||
| [Weave](https://www.weave.works/). | ||||
| 
 | ||||
| # Install UCP with a custom CNI plugin | ||||
| 
 | ||||
| Modify the [UCP install command-line](../admin/install/index.md#step-4-install-ucp) | ||||
| to add the `--cni-installer-url` [option](/reference/ucp/3.0/cli/install.md), | ||||
| providing a URL for the location of the CNI plugin's YAML file: | ||||
| 
 | ||||
| ```bash | ||||
| docker container run --rm -it --name ucp \ | ||||
|   -v /var/run/docker.sock:/var/run/docker.sock \ | ||||
|   {{ page.ucp_org }}/{{ page.ucp_repo }}:{{ page.ucp_version }} install \ | ||||
|   --host-address <node-ip-address> \ | ||||
|   --cni-installer-url <cni-yaml-url> \ | ||||
|   --interactive | ||||
| ``` | ||||
| 
 | ||||
| You must provide a correct YAML installation file for the CNI plugin, but most | ||||
| of the default files work on Docker EE with no modification. | ||||
| 
 | ||||
| ## YAML files for CNI plugins | ||||
| 
 | ||||
| Use the following commands to get the YAML files for popular CNI plugins.  | ||||
| 
 | ||||
| - [Flannel](https://github.com/coreos/flannel) | ||||
|   ```bash | ||||
|   # Get the URL for the Flannel CNI plugin. | ||||
|   CNI_URL="https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml" | ||||
|   ``` | ||||
| - [Weave](https://www.weave.works/) | ||||
|   ```bash | ||||
|   # Get the URL for the Weave CNI plugin.  | ||||
|   CNI_URL="https://cloud.weave.works/k8s/net?k8s-version=Q2xpZW50IFZlcnNpb246IHZlcnNpb24uSW5mb3tNYWpvcjoiMSIsIE1pbm9yOiI5IiwgR2l0VmVyc2lvbjoidjEuOS4zIiwgR2l0Q29tbWl0OiJkMjgzNTQxNjU0NGYyOThjOTE5ZTJlYWQzYmUzZDA4NjRiNTIzMjNiIiwgR2l0VHJlZVN0YXRlOiJjbGVhbiIsIEJ1aWxkRGF0ZToiMjAxOC0wMi0wN1QxMjoyMjoyMVoiLCBHb1ZlcnNpb246ImdvMS45LjIiLCBDb21waWxlcjoiZ2MiLCBQbGF0Zm9ybToibGludXgvYW1kNjQifQpTZXJ2ZXIgVmVyc2lvbjogdmVyc2lvbi5JbmZve01ham9yOiIxIiwgTWlub3I6IjgrIiwgR2l0VmVyc2lvbjoidjEuOC4yLWRvY2tlci4xNDMrYWYwODAwNzk1OWUyY2UiLCBHaXRDb21taXQ6ImFmMDgwMDc5NTllMmNlYWUxMTZiMDk4ZWNhYTYyNGI0YjI0MjBkODgiLCBHaXRUcmVlU3RhdGU6ImNsZWFuIiwgQnVpbGREYXRlOiIyMDE4LTAyLTAxVDIzOjI2OjE3WiIsIEdvVmVyc2lvbjoiZ28xLjguMyIsIENvbXBpbGVyOiJnYyIsIFBsYXRmb3JtOiJsaW51eC9hbWQ2NCJ9Cg==" | ||||
|   ``` | ||||
|   If you have kubectl available, for example by using | ||||
|   [Docker for Mac](/docker-for-mac/kubernetes.md), you can use the following | ||||
|   command to get the URL for the [Weave](https://www.weave.works/) CNI plugin: | ||||
|   ```bash | ||||
|   # Get the URL for the Weave CNI plugin.  | ||||
|   CNI_URL="https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')" | ||||
|   ``` | ||||
| - [Romana](http://docs.romana.io/) | ||||
|   ```bash | ||||
|   # Get the URL for the Romana CNI plugin. | ||||
|   CNI_URL="https://raw.githubusercontent.com/romana/romana/master/docs/kubernetes/romana-kubeadm.yml" | ||||
|   ``` | ||||
| 
 | ||||
| {% endif %} | ||||
|  | @ -12,6 +12,8 @@ next_steps: | |||
|   title: Deploy to Kubernetes on Docker for Mac | ||||
| --- | ||||
| 
 | ||||
| {% if include.version=="ucp-3.0" %} | ||||
| 
 | ||||
| Docker EE installs Kubernetes automatically when you install UCP, and the | ||||
| web UI enables deploying Kubernetes workloads and monitoring pods. You can | ||||
| also interact with the Kubernetes deployment by using the Kubernetes | ||||
|  | @ -101,3 +103,5 @@ NAME             TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE | |||
| svc/kubernetes   ClusterIP   10.96.0.1    <none>        443/TCP   5d | ||||
| ``` | ||||
| 
 | ||||
| {% endif %} | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue