# V1.2 Create Service Issue

**URL:** https://forums.suse.com/t/v1-2-create-service-issue/4897
**Category:** Rancher 1.x
**Created:** [December 13, 2016, 8:04am UTC](https://forums.suse.com/t/v1-2-create-service-issue/4897 "2016-12-13T08:04:04Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![hiscal](https://avatars.discourse-cdn.com/v4/letter/h/9de0a6/32.png) [@hiscal](https://forums.suse.com/u/hiscal)
#### Post date: [December 13, 2016, 8:04am UTC](https://forums.suse.com/t/v1-2-create-service-issue/4897/1 "2016-12-13T08:04:04Z")

</div>

Hi,

I’m using rancher v1.2 with kubernetes orchestration, I tried to create a deployment and service with below yaml:

Here’s the deployment: (The post removed my spaces before my lines…I don’t know how to add them back)  
apiVersion: extensions/v1beta1  
kind: Deployment  
metadata:  
name: mynginx  
spec:  
replicas: 2  
template:  
metadata:  
labels:  
name: mynginx  
spec:  
containers:  
- name: mynginx  
image: nginx  
ports:  
- containerPort: 80

And here’s the service:  
apiVersion: v1  
kind: Service  
metadata:  
name: mynginx  
labels:  
name: mynginx  
spec:  
type: NodePort  
ports:

- name: mynginx  
port: 80  
protocol: TCP  
targetPort: 80  
nodePort: 8888  
selector:  
name: mynginx

I can create deployment successfully, but failed to create service, please see snapshot below:

 ![](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/1/1b7d25e825de16c2312e905e308ebfdb56792096.jpg)

Can anyone tell me what’s happening here? Thanks.

---

<div class="post-metadata">

### Author: ![hiscal](https://avatars.discourse-cdn.com/v4/letter/h/9de0a6/32.png) [@hiscal](https://forums.suse.com/u/hiscal)
#### Post date: [December 14, 2016, 8:46am UTC](https://forums.suse.com/t/v1-2-create-service-issue/4897/2 "2016-12-14T08:46:55Z")

</div>

Sorry, issue addressed, I defined with wrong nodePort range.

---

<div class="post-metadata">

### Author: ![lu162](https://avatars.discourse-cdn.com/v4/letter/l/d78d45/32.png) [@lu162](https://forums.suse.com/u/lu162)
#### Post date: [January 9, 2017, 12:30am UTC](https://forums.suse.com/t/v1-2-create-service-issue/4897/3 "2017-01-09T00:30:13Z")

</div>

hi,i have the same wrongs,i want set nodeport=80,but filed,please tell the ditails about how to resolve this，thanks！

---

<div class="post-metadata">

### Author: ![hiscal](https://avatars.discourse-cdn.com/v4/letter/h/9de0a6/32.png) [@hiscal](https://forums.suse.com/u/hiscal)
#### Post date: [January 23, 2017, 4:25am UTC](https://forums.suse.com/t/v1-2-create-service-issue/4897/4 "2017-01-23T04:25:58Z")

</div>

default nodeport range is 30000~32767, you cannot define 80 here.
