39 lines
1020 B
YAML
39 lines
1020 B
YAML
apiVersion: apps/v1
|
|
kind: Deployment # Kubernetes resource kind we are creating
|
|
metadata:
|
|
name: ekart-deployment
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: ekart
|
|
replicas: 2 # Number of replicas that will be created for this deployment
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: ekart
|
|
spec:
|
|
containers:
|
|
- name: ekart
|
|
image: adijaiswal/ekart:latest # Image that will be used to containers in the cluster
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- containerPort: 8070 # The port that the container is running on in the cluster
|
|
|
|
|
|
---
|
|
|
|
apiVersion: v1 # Kubernetes API version
|
|
kind: Service # Kubernetes resource kind we are creating
|
|
metadata: # Metadata of the resource kind we are creating
|
|
name: ekart-ssvc
|
|
spec:
|
|
selector:
|
|
app: ekart
|
|
ports:
|
|
- protocol: "TCP"
|
|
port: 8070 # The port that the service is running on in the cluster
|
|
targetPort: 8070 # The port exposed by the service
|
|
type: LoadBalancer # type of the service.
|
|
|
|
|