Skip to content

Commit

Permalink
Use NodePort for local deployment via minikube
Browse files Browse the repository at this point in the history
  • Loading branch information
yamaszone committed Nov 17, 2017
1 parent 9669cdb commit 1527e44
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions kubernetes/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: php7-deployment
name: php-deployment
spec:
replicas: 1
replicas: 2
template:
metadata:
labels:
app: php7
app: php
spec:
containers:
- name: php7
- name: php
image: yamaszone/php7-lumen:7.1-fpm-alpine
ports:
- containerPort: 9000
Expand Down
11 changes: 6 additions & 5 deletions kubernetes/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@ metadata:
name: php
namespace: default
labels:
app: php7
app: php
spec:
ports:
- name: listener
protocol: TCP
port: 9000
targetPort: 9000
selector:
app: php7
type: NodePort
app: php
sessionAffinity: None
---
kind: Service
apiVersion: v1
metadata:
name: nginx-svc
name: nginx
namespace: default
labels:
app: nginx
Expand All @@ -32,5 +31,7 @@ spec:
targetPort: 80
selector:
app: nginx
type: LoadBalancer
type: NodePort
# Use LoadBalancer type if supported by the cloud provider
#type: LoadBalancer
sessionAffinity: None

0 comments on commit 1527e44

Please sign in to comment.