Skip to content

Instantly share code, notes, and snippets.

@sithumonline
Created December 17, 2020 06:37
Show Gist options
  • Select an option

  • Save sithumonline/11576f957c5357b6380d19bda018b127 to your computer and use it in GitHub Desktop.

Select an option

Save sithumonline/11576f957c5357b6380d19bda018b127 to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: your-app
namespace: default
spec:
replicas: 1
selector:
matchLabels:
run: web-demo
template:
metadata:
labels:
run: web-demo
spec:
containers:
- name: your-app
image: registry.hub.docker.com/username/imagename:tag
env:
- name: DEMO_VALUE
value: "This is my value"
---
apiVersion: v1
kind: Service
metadata:
name: app-demo-entrypoint
namespace: default
spec:
type: NodePort
selector:
run: web-demo
ports:
- port: 8080
targetPort: 8080
nodePort: 30001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment