-
Notifications
You must be signed in to change notification settings - Fork 3
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
2 changed files
with
49 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
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,32 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: ttt-demo-deployment | ||
spec: | ||
selector: | ||
matchLabels: | ||
run: ttt-demo # This selects the Pod Template defined below. | ||
replicas: 2 # num of pods matching the template | ||
template: | ||
metadata: | ||
labels: | ||
run: ttt-demo # This labels/identifies this template as "run: ttt-demo". | ||
spec: | ||
containers: | ||
- name: ttt-container | ||
image: ttt:latest | ||
imagePullPolicy: Never # required since we are using a local Docker registry | ||
ports: | ||
- containerPort: 80 | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: ttt-demo-service | ||
spec: | ||
selector: | ||
run: ttt-demo # This selects the pods defined in the Deployment above. | ||
type: LoadBalancer | ||
ports: | ||
- port: 80 | ||
targetPort: 80 |