Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CSD
public
KubeFed
Commits
f9fc8167
Commit
f9fc8167
authored
Oct 12, 2020
by
Marco Lorini
Browse files
2020-10-12 ML: add deployment section
parent
f6f63c91
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
f9fc8167
...
@@ -341,3 +341,48 @@ spec:
...
@@ -341,3 +341,48 @@ spec:
```
bash
```
bash
$
kubectl
--context
=
<host-cluster-context> create
-f
resource/externaldns.yaml
$
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
```
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment