...
Code Block | ||
---|---|---|
| ||
apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
data:
config: |
address-pools:
- name: default
protocol: layer2
addresses:
- 192.168.1.240-192.168.1.250 |
...
로드밸런서 타입의 Service 배포 예제
Code Block | ||
---|---|---|
| ||
apiVersion: apps/v1 kind: Deployment metadata: name: nginx spec: selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1 ports: - name: http containerPort: 80 --- apiVersion: v1 kind: Service metadata: name: nginx spec: ports: - name: http port: 8080 protocol: TCP targetPort: 80 selector: app: nginx type: LoadBalancer |
...