Commit f9fc8167 authored by Marco Lorini's avatar Marco Lorini
Browse files

2020-10-12 ML: add deployment section

parent f6f63c91
......@@ -341,3 +341,48 @@ spec:
```bash
$ kubectl --context=<host-cluster-context> create -f resource/externaldns.yaml
```
### Federate deployment
Now create the federated deployment (for this example we used a simple "Hello World" image):
```yaml
# federated_deployment.yaml
apiVersion: types.kubefed.io/v1beta1
kind: FederatedDeployment
metadata:
name: fed-helloworld
namespace: fed-namespace
spec:
template:
metadata:
name: helloworld
spec:
replicas: 2
selector:
matchLabels:
app: helloworld
template:
metadata:
labels:
app: helloworld
spec:
containers:
- image: docker.io/csdgarr/hello-world:v1
name: helloworld
imagePullPolicy: IfNotPresent
placement:
clusters:
- name: member-cluster-1
- name: member-cluster-2
overrides:
- clusterName: member-cluster-2
clusterOverrides:
- path: "/spec/replicas"
value: 3
```
```bash
$ kubectl --context=<host-cluster-context> create -f resource/federated_deployment.yaml
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment