
This example shows a simple two tier setup in Kubernetes, and simply prints the environment information that each pod sees. Querying the service multiple times will show services at work load balancing requests.
16 lines
210 B
YAML
16 lines
210 B
YAML
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: show-srv
|
|
labels:
|
|
type: show-type
|
|
spec:
|
|
type: LoadBalancer
|
|
ports:
|
|
- port: 80
|
|
protocol: TCP
|
|
targetPort: 8080
|
|
selector:
|
|
type: show-type
|