-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
0a77514
commit b8a148e
Showing
3 changed files
with
119 additions
and
56 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,43 @@ | ||
apiVersion: v1 | ||
kind: ReplicationController | ||
metadata: | ||
name: nginx-rc #name of the controller | ||
namespace: dev | ||
labels: #veriy imp. will use in service, | ||
type: dev | ||
app: nginx | ||
myapp: mynginx | ||
spec: | ||
replicas: 2 #replicationController, ReplicaSet and deployment | ||
# nodeName : minikube-m04 #Here we can give name of the node where the pod needs to be create. | ||
selector: | ||
app: nginx #works on the labels | ||
template: #below details are belongs to Pod | ||
metadata: | ||
name: nginx | ||
labels: | ||
app: nginx | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx | ||
imagePullPolicy: IfNotPresent | ||
ports: | ||
- containerPort: 80 | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: nginx-service | ||
namespace: dev | ||
labels: | ||
type: service | ||
app: nginx | ||
spec: | ||
type: ClusterIP #NodePorts, Loadbalancer | ||
selector: #labels of above file will be given here | ||
app: nginx | ||
type: dev | ||
ports: | ||
- port: 80 | ||
targetPort: 80 |
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,20 @@ | ||
apiVersion: v1 | ||
kind: apiVersion: v1 | ||
kind: ReplicationController | ||
metadata: | ||
name: myapp | ||
spec: | ||
replicas: <Replicas> | ||
selector: | ||
app: myapp | ||
template: | ||
metadata: | ||
name: myapp | ||
labels: | ||
app: myapp | ||
spec: | ||
containers: | ||
- name: myapp | ||
image: <Image> | ||
ports: | ||
- containerPort: <Port> |