Skip to content

Instantly share code, notes, and snippets.

@ajeetraina
Created March 1, 2023 10:32
Show Gist options
  • Save ajeetraina/93eb10776d559831be72414149348766 to your computer and use it in GitHub Desktop.
Save ajeetraina/93eb10776d559831be72414149348766 to your computer and use it in GitHub Desktop.
Kubernetes YAML file
apiVersion: v1
kind: Service
metadata:
name: tutorial
spec:
ports:
- name: 80-tcp
port: 80
protocol: TCP
targetPort: 80
selector:
com.docker.project: tutorial
type: LoadBalancer
status:
loadBalancer: {}
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
com.docker.project: tutorial
name: tutorial
spec:
replicas: 1
selector:
matchLabels:
com.docker.project: tutorial
strategy:
type: Recreate
template:
metadata:
labels:
com.docker.project: tutorial
spec:
containers:
- image: docker/getting-started
name: tutorial
ports:
- containerPort: 80
protocol: TCP
resources: {}
restartPolicy: Always
status: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment