Skip to content

Commit 42ca885

Browse files
author
Angus Salkeld
committed
Add "create service" sub-commands
This adds: create service clusterip create service nodeport create service loadbalancer
1 parent 2f7a161 commit 42ca885

15 files changed

+787
-0
lines changed

.generated_docs

+8
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ docs/man/man1/kubectl-create-secret-docker-registry.1
3333
docs/man/man1/kubectl-create-secret-generic.1
3434
docs/man/man1/kubectl-create-secret-tls.1
3535
docs/man/man1/kubectl-create-secret.1
36+
docs/man/man1/kubectl-create-service-clusterip.1
37+
docs/man/man1/kubectl-create-service-loadbalancer.1
38+
docs/man/man1/kubectl-create-service-nodeport.1
39+
docs/man/man1/kubectl-create-service.1
3640
docs/man/man1/kubectl-create-serviceaccount.1
3741
docs/man/man1/kubectl-create.1
3842
docs/man/man1/kubectl-delete.1
@@ -95,6 +99,10 @@ docs/user-guide/kubectl/kubectl_create_secret.md
9599
docs/user-guide/kubectl/kubectl_create_secret_docker-registry.md
96100
docs/user-guide/kubectl/kubectl_create_secret_generic.md
97101
docs/user-guide/kubectl/kubectl_create_secret_tls.md
102+
docs/user-guide/kubectl/kubectl_create_service.md
103+
docs/user-guide/kubectl/kubectl_create_service_clusterip.md
104+
docs/user-guide/kubectl/kubectl_create_service_loadbalancer.md
105+
docs/user-guide/kubectl/kubectl_create_service_nodeport.md
98106
docs/user-guide/kubectl/kubectl_create_serviceaccount.md
99107
docs/user-guide/kubectl/kubectl_delete.md
100108
docs/user-guide/kubectl/kubectl_describe.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This file is autogenerated, but we've stopped checking such files into the
2+
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
3+
populate this file.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This file is autogenerated, but we've stopped checking such files into the
2+
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
3+
populate this file.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This file is autogenerated, but we've stopped checking such files into the
2+
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
3+
populate this file.
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This file is autogenerated, but we've stopped checking such files into the
2+
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
3+
populate this file.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->
2+
3+
<!-- BEGIN STRIP_FOR_RELEASE -->
4+
5+
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
6+
width="25" height="25">
7+
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
8+
width="25" height="25">
9+
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
10+
width="25" height="25">
11+
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
12+
width="25" height="25">
13+
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
14+
width="25" height="25">
15+
16+
<h2>PLEASE NOTE: This document applies to the HEAD of the source tree</h2>
17+
18+
If you are using a released version of Kubernetes, you should
19+
refer to the docs that go with that version.
20+
21+
Documentation for other releases can be found at
22+
[releases.k8s.io](http://releases.k8s.io).
23+
</strong>
24+
--
25+
26+
<!-- END STRIP_FOR_RELEASE -->
27+
28+
<!-- END MUNGE: UNVERSIONED_WARNING -->
29+
30+
This file is autogenerated, but we've stopped checking such files into the
31+
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
32+
populate this file.
33+
34+
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
35+
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_create_service.md?pixel)]()
36+
<!-- END MUNGE: GENERATED_ANALYTICS -->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->
2+
3+
<!-- BEGIN STRIP_FOR_RELEASE -->
4+
5+
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
6+
width="25" height="25">
7+
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
8+
width="25" height="25">
9+
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
10+
width="25" height="25">
11+
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
12+
width="25" height="25">
13+
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
14+
width="25" height="25">
15+
16+
<h2>PLEASE NOTE: This document applies to the HEAD of the source tree</h2>
17+
18+
If you are using a released version of Kubernetes, you should
19+
refer to the docs that go with that version.
20+
21+
Documentation for other releases can be found at
22+
[releases.k8s.io](http://releases.k8s.io).
23+
</strong>
24+
--
25+
26+
<!-- END STRIP_FOR_RELEASE -->
27+
28+
<!-- END MUNGE: UNVERSIONED_WARNING -->
29+
30+
This file is autogenerated, but we've stopped checking such files into the
31+
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
32+
populate this file.
33+
34+
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
35+
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_create_service_clusterip.md?pixel)]()
36+
<!-- END MUNGE: GENERATED_ANALYTICS -->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->
2+
3+
<!-- BEGIN STRIP_FOR_RELEASE -->
4+
5+
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
6+
width="25" height="25">
7+
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
8+
width="25" height="25">
9+
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
10+
width="25" height="25">
11+
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
12+
width="25" height="25">
13+
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
14+
width="25" height="25">
15+
16+
<h2>PLEASE NOTE: This document applies to the HEAD of the source tree</h2>
17+
18+
If you are using a released version of Kubernetes, you should
19+
refer to the docs that go with that version.
20+
21+
Documentation for other releases can be found at
22+
[releases.k8s.io](http://releases.k8s.io).
23+
</strong>
24+
--
25+
26+
<!-- END STRIP_FOR_RELEASE -->
27+
28+
<!-- END MUNGE: UNVERSIONED_WARNING -->
29+
30+
This file is autogenerated, but we've stopped checking such files into the
31+
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
32+
populate this file.
33+
34+
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
35+
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_create_service_loadbalancer.md?pixel)]()
36+
<!-- END MUNGE: GENERATED_ANALYTICS -->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->
2+
3+
<!-- BEGIN STRIP_FOR_RELEASE -->
4+
5+
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
6+
width="25" height="25">
7+
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
8+
width="25" height="25">
9+
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
10+
width="25" height="25">
11+
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
12+
width="25" height="25">
13+
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
14+
width="25" height="25">
15+
16+
<h2>PLEASE NOTE: This document applies to the HEAD of the source tree</h2>
17+
18+
If you are using a released version of Kubernetes, you should
19+
refer to the docs that go with that version.
20+
21+
Documentation for other releases can be found at
22+
[releases.k8s.io](http://releases.k8s.io).
23+
</strong>
24+
--
25+
26+
<!-- END STRIP_FOR_RELEASE -->
27+
28+
<!-- END MUNGE: UNVERSIONED_WARNING -->
29+
30+
This file is autogenerated, but we've stopped checking such files into the
31+
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
32+
populate this file.
33+
34+
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
35+
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_create_service_nodeport.md?pixel)]()
36+
<!-- END MUNGE: GENERATED_ANALYTICS -->

pkg/kubectl/cmd/create.go

+1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ func NewCmdCreate(f *cmdutil.Factory, out io.Writer) *cobra.Command {
8484
cmd.AddCommand(NewCmdCreateSecret(f, out))
8585
cmd.AddCommand(NewCmdCreateConfigMap(f, out))
8686
cmd.AddCommand(NewCmdCreateServiceAccount(f, out))
87+
cmd.AddCommand(NewCmdCreateService(f, out))
8788
return cmd
8889
}
8990

0 commit comments

Comments
 (0)