Skip to content

Instantly share code, notes, and snippets.

@ShubhamRasal
Created September 27, 2025 19:19
Show Gist options
  • Save ShubhamRasal/347174b7dcaed606e40477eac25ad8f0 to your computer and use it in GitHub Desktop.
Save ShubhamRasal/347174b7dcaed606e40477eac25ad8f0 to your computer and use it in GitHub Desktop.
demo deployment and service
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-deployment
spec:
replicas: 2
selector:
matchLabels:
app: hello
template:
metadata:
labels:
app: hello
spec:
containers:
- name: hello
image: nginxdemos/hello:plain-text
ports:
- containerPort: 80
apiVersion: v1
kind: Service
metadata:
name: hello-service
annotations:
service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
spec:
selector:
app: hello
ports:
- port: 80
targetPort: 80
type: LoadBalancer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment