-
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.
Add sections to create and expose deployment
- Loading branch information
1 parent
4b90f39
commit 3801b54
Showing
4 changed files
with
153 additions
and
31 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,25 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app: simple-api | ||
name: simple-api-deployment | ||
spec: | ||
replicas: 2 | ||
selector: | ||
matchLabels: | ||
app: simple-api | ||
template: | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app: simple-api | ||
spec: | ||
containers: | ||
- image: "ghcr.io/varianter/k8s-101:v1.0.1" | ||
name: api | ||
ports: | ||
- containerPort: 8080 | ||
resources: {} | ||
status: {} |
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,17 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: api-ingress | ||
spec: | ||
ingressClassName: nginx | ||
rules: | ||
- host: api.local | ||
http: | ||
paths: | ||
- backend: | ||
service: | ||
name: api-service | ||
port: | ||
number: 8080 | ||
path: / | ||
pathType: Prefix |
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,11 @@ | ||
kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: api-service | ||
spec: | ||
selector: | ||
app: simple-api | ||
ports: | ||
# Default port used by the image | ||
- port: 8080 | ||
targetPort: 8080 |