Skip to content

Commit

Permalink
Welcome to Stack Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
Kalyan Reddy Daida authored and Kalyan Reddy Daida committed Jun 18, 2020
1 parent 36f5eec commit 8891d3f
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 9 deletions.
7 changes: 6 additions & 1 deletion 07-PODs-with-YAML/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:

spec:
```
- **API Objects Reference:** https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#pod-v1-core
- **Pod API Objects Reference:** https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#pod-v1-core
## Step-02: Create Simple Pod Definition using YAML
- We are going to create a very basic pod definition
Expand Down Expand Up @@ -71,3 +71,8 @@ http://<WorkerNode-Public-IP>:<NodePort>
http://<WorkerNode-Public-IP>:31231
```

## API Object References
- **Pod**: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#pod-v1-core
- **Service**: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#service-v1-core


6 changes: 3 additions & 3 deletions 07-PODs-with-YAML/kube-manifests/01-kube-base-definition.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion:
kind:
apiVersion:
kind:
metadata:

spec:

# Types of Kubernetes Objects
Expand Down
15 changes: 15 additions & 0 deletions 07-PODs-with-YAML/kube-manifests/02-pod-definition.yml
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



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

0 comments on commit 8891d3f

Please sign in to comment.