Last active
June 14, 2019 17:45
-
-
Save warroyo/fd14aeefbcf0e8e7631722ec6e2ba582 to your computer and use it in GitHub Desktop.
metal lb install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
namespace: metallb-system | |
name: config | |
data: | |
config: | | |
address-pools: | |
- name: default | |
protocol: layer2 | |
addresses: | |
- 10.197.28.31-10.197.28.230 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: my-nginx | |
spec: | |
selector: | |
matchLabels: | |
run: my-nginx | |
replicas: 2 | |
template: | |
metadata: | |
labels: | |
run: my-nginx | |
spec: | |
containers: | |
- name: my-nginx | |
image: nginx | |
ports: | |
- containerPort: 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
kubectl apply -f https://raw.githubusercontent.com/google/metallb/v0.7.3/manifests/metallb.yaml | |
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: my-nginx | |
labels: | |
run: my-nginx | |
spec: | |
type: LoadBalancer | |
ports: | |
- port: 80 | |
protocol: TCP | |
selector: | |
run: my-nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment