-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add kubernetes deployment and service yaml
- Loading branch information
1 parent
d6c1f9c
commit b76765a
Showing
6 changed files
with
35 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,21 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: flask-hello-deployment # name of the deployment | ||
|
||
spec: | ||
template: # pod defintion | ||
metadata: | ||
name: flask-hello # name of the pod | ||
labels: | ||
app: flask-hello | ||
tier: frontend | ||
spec: | ||
containers: | ||
- name: flask-hello | ||
image: shivammitra/flask-hello-world:latest | ||
replicas: 3 | ||
selector: # Mandatory, Select the pods which needs to be in the replicaset | ||
matchLabels: | ||
app: flask-hello | ||
tier: frontend |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: flask-hello-service-nodeport # name of the service | ||
|
||
spec: | ||
type: NodePort # Used for accessing a port externally | ||
ports: | ||
- port: 5000 # Service port | ||
targetPort: 5000 # Pod port, default: same as port | ||
nodePort: 30008 # Node port which can be used externally, default: auto-assign any free port | ||
selector: # Which pods to expose externally ? | ||
app: flask-hello | ||
tier: frontend |