Skip to content

Commit f28c25d

Browse files
Jim GalasynJoao Fernandes
authored andcommitted
First draft of CNI plugin topic (docker#494)
* First draft of CNI plugin topic * Fix for kubectl dependency issue
1 parent 4452891 commit f28c25d

File tree

4 files changed

+84
-0
lines changed

4 files changed

+84
-0
lines changed

_data/toc.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,6 +1759,8 @@ manuals:
17591759
path: /ee/ucp/kubernetes/deploy-ingress-controller/
17601760
- title: Create a service account for a Kubernetes app
17611761
path: /ee/ucp/kubernetes/create-service-account/
1762+
- title: Install a CNI plugin
1763+
path: /ee/ucp/kubernetes/install-cni-plugin/
17621764
- title: API reference
17631765
path: /reference/ucp/3.0/api/
17641766
nosync: true

ee/ucp/admin/install/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,14 @@ To install UCP:
8787
To find what other options are available in the install command, check the
8888
[reference documentation](/reference/ucp/3.0/cli/install.md).
8989
90+
> Custom CNI plugins
91+
>
92+
> If you want to use a third-party Container Networking Interface (CNI) plugin,
93+
> like Flannel or Weave, modify the previous command line to include the
94+
> `--cni-installer-url` option. Learn how to
95+
> [install a CNI plugin](../../kubernetes/install-cni-plugin.md).
96+
{: important}
97+
9098
## Step 5: License your installation
9199
92100
Now that UCP is installed, you need to license it.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
title: Install a CNI plugin
3+
description: Learn how to install a Container Networking Interface plugin on Docker Universal Control Plane.
4+
keywords: ucp, cli, administration, kubectl, Kubernetes, cni, Container Networking Interface, flannel, weave
5+
ui_tabs:
6+
- version: ucp-3.0
7+
orhigher: false
8+
next_steps:
9+
- path: ../admin/install/
10+
title: Install UCP for production
11+
- path: ../kubernetes/
12+
title: Deploy a workload to a Kubernetes cluster
13+
---
14+
15+
{% if include.version=="ucp-3.0" %}
16+
17+
With Docker Universal Control Plane, you can install a third-party Container
18+
Networking Interface (CNI) plugin when you install UCP, by using the
19+
`--cni-installer-url` option. By default, Docker EE installs the built-in
20+
[Calico](https://github.com/projectcalico/cni-plugin) plugin, but you can
21+
override the default and install a plugin of your choice,
22+
like [Flannel](https://github.com/coreos/flannel) or
23+
[Weave](https://www.weave.works/).
24+
25+
# Install UCP with a custom CNI plugin
26+
27+
Modify the [UCP install command-line](../admin/install/index.md#step-4-install-ucp)
28+
to add the `--cni-installer-url` [option](/reference/ucp/3.0/cli/install.md),
29+
providing a URL for the location of the CNI plugin's YAML file:
30+
31+
```bash
32+
docker container run --rm -it --name ucp \
33+
-v /var/run/docker.sock:/var/run/docker.sock \
34+
{{ page.ucp_org }}/{{ page.ucp_repo }}:{{ page.ucp_version }} install \
35+
--host-address <node-ip-address> \
36+
--cni-installer-url <cni-yaml-url> \
37+
--interactive
38+
```
39+
40+
You must provide a correct YAML installation file for the CNI plugin, but most
41+
of the default files work on Docker EE with no modification.
42+
43+
## YAML files for CNI plugins
44+
45+
Use the following commands to get the YAML files for popular CNI plugins.
46+
47+
- [Flannel](https://github.com/coreos/flannel)
48+
```bash
49+
# Get the URL for the Flannel CNI plugin.
50+
CNI_URL="https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml"
51+
```
52+
- [Weave](https://www.weave.works/)
53+
```bash
54+
# Get the URL for the Weave CNI plugin.
55+
CNI_URL="https://cloud.weave.works/k8s/net?k8s-version=Q2xpZW50IFZlcnNpb246IHZlcnNpb24uSW5mb3tNYWpvcjoiMSIsIE1pbm9yOiI5IiwgR2l0VmVyc2lvbjoidjEuOS4zIiwgR2l0Q29tbWl0OiJkMjgzNTQxNjU0NGYyOThjOTE5ZTJlYWQzYmUzZDA4NjRiNTIzMjNiIiwgR2l0VHJlZVN0YXRlOiJjbGVhbiIsIEJ1aWxkRGF0ZToiMjAxOC0wMi0wN1QxMjoyMjoyMVoiLCBHb1ZlcnNpb246ImdvMS45LjIiLCBDb21waWxlcjoiZ2MiLCBQbGF0Zm9ybToibGludXgvYW1kNjQifQpTZXJ2ZXIgVmVyc2lvbjogdmVyc2lvbi5JbmZve01ham9yOiIxIiwgTWlub3I6IjgrIiwgR2l0VmVyc2lvbjoidjEuOC4yLWRvY2tlci4xNDMrYWYwODAwNzk1OWUyY2UiLCBHaXRDb21taXQ6ImFmMDgwMDc5NTllMmNlYWUxMTZiMDk4ZWNhYTYyNGI0YjI0MjBkODgiLCBHaXRUcmVlU3RhdGU6ImNsZWFuIiwgQnVpbGREYXRlOiIyMDE4LTAyLTAxVDIzOjI2OjE3WiIsIEdvVmVyc2lvbjoiZ28xLjguMyIsIENvbXBpbGVyOiJnYyIsIFBsYXRmb3JtOiJsaW51eC9hbWQ2NCJ9Cg=="
56+
```
57+
If you have kubectl available, for example by using
58+
[Docker for Mac](/docker-for-mac/kubernetes.md), you can use the following
59+
command to get the URL for the [Weave](https://www.weave.works/) CNI plugin:
60+
```bash
61+
# Get the URL for the Weave CNI plugin.
62+
CNI_URL="https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"
63+
```
64+
- [Romana](http://docs.romana.io/)
65+
```bash
66+
# Get the URL for the Romana CNI plugin.
67+
CNI_URL="https://raw.githubusercontent.com/romana/romana/master/docs/kubernetes/romana-kubeadm.yml"
68+
```
69+
70+
{% endif %}

ee/ucp/user-access/kubectl.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ next_steps:
1212
title: Deploy to Kubernetes on Docker for Mac
1313
---
1414

15+
{% if include.version=="ucp-3.0" %}
16+
1517
Docker EE installs Kubernetes automatically when you install UCP, and the
1618
web UI enables deploying Kubernetes workloads and monitoring pods. You can
1719
also interact with the Kubernetes deployment by using the Kubernetes
@@ -101,3 +103,5 @@ NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
101103
svc/kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 5d
102104
```
103105

106+
{% endif %}
107+

0 commit comments

Comments
 (0)