hacks/modernizing-monoliths/solutions/challenge-2/service.yaml (16 lines of code) (raw):
apiVersion: v1
kind: Service
metadata:
name: dungeon-crawl-stone-soup
namespace: <NAMESPACE>
spec:
ports:
- name: "http"
port: 80
protocol: TCP
targetPort: 8080
selector:
run: dungeon-crawl-stone-soup
sessionAffinity: ClientIP
type: LoadBalancer
loadBalancerIP: <STATIC-IPV4-ADDRESS>