Skip to content

Instantly share code, notes, and snippets.

@bendangnuksung
Created May 26, 2020 18:12
Show Gist options
  • Save bendangnuksung/5f3edd5f16ea5bc4c2bc58a783b562c0 to your computer and use it in GitHub Desktop.
Save bendangnuksung/5f3edd5f16ea5bc4c2bc58a783b562c0 to your computer and use it in GitHub Desktop.
apiVersion: v1
# service type
kind: Service
metadata:
# Service name
labels:
run: myresnet-service
name: myresnet-service
spec:
ports:
# Link Port 8501 from all nodes from app: myresnet-deployment
# port = Incoming Port, targetPort = Routed port
- port: 8501
targetPort: 8501
name: restapi
# Link Port 8500 from all nodes from app: myresnet-deployment
- port: 8500
targetPort: 8500
name: grpc
selector:
# Select app name, Which is myresnet-deployment defined in deployment.yaml
app: myresnet-deployment
type: LoadBalancer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment