forked from stacksimplify/kubernetes-fundamentals
-
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
Kalyan Reddy Daida
authored and
Kalyan Reddy Daida
committed
Jun 18, 2020
1 parent
36f5eec
commit 8891d3f
Showing
4 changed files
with
32 additions
and
9 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
apiVersion: | ||
kind: | ||
apiVersion: | ||
kind: | ||
metadata: | ||
|
||
spec: | ||
|
||
# Types of Kubernetes Objects | ||
|
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,15 @@ | ||
apiVersion: v1 # String | ||
kind: Pod # String | ||
metadata: # Dictionary | ||
name: myapp-pod | ||
labels: # Dictionary | ||
app: myapp | ||
spec: | ||
containers: # List | ||
- name: myapp | ||
image: stacksimplify/kubenginx:1.0.0 | ||
ports: | ||
- containerPort: 80 | ||
|
||
|
||
|
13 changes: 8 additions & 5 deletions
13
07-PODs-with-YAML/kube-manifests/backup/03-pod-nodeport-service.yml
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 |
---|---|---|
@@ -1,12 +1,15 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: myapp-pod-nodeport-service | ||
name: myapp-pod-nodeport-service # Name of the Service | ||
spec: | ||
type: NodePort | ||
selector: | ||
# Loadbalance traffic across Pods matching this label selector | ||
app: myapp | ||
ports: | ||
- port: 80 | ||
targetPort: 80 | ||
nodePort: 31231 | ||
# Accept traffic sent to port 80 | ||
ports: | ||
- name: http | ||
port: 80 # Service Port | ||
targetPort: 80 # Container Port | ||
nodePort: 31231 # NodePort |