-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment # Kubernetes resource kind we are creating | ||
metadata: | ||
name: recipeapp-deployment | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: recipe | ||
replicas: 2 # Number of replicas that will be created for this deployment | ||
template: | ||
metadata: | ||
labels: | ||
app: recipe | ||
spec: | ||
containers: | ||
- name: recipe | ||
image: chaden/recipeapp:latest # Image that will be used to containers in the cluster | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 8080 # 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: recipe-ssvc | ||
spec: | ||
selector: | ||
app: recipe | ||
ports: | ||
- protocol: "TCP" | ||
port: 8080 # The port that the service is running on in the cluster | ||
targetPort: 8080 # The port exposed by the service | ||
type: LoadBalancer # type of the service. |