Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Update expose command for kubectl cli #16

Merged
rizchelwood merged 2 commits into IBM:master from mofsal:patch-1
Dec 13, 2018
Merged

Conversation

Copy link
Contributor

@mofsal mofsal commented Aug 14, 2018
edited
Loading

At least in Kubectl version v1.11.1, the format for exposing a Kubernetes application is:

Usage:
kubectl expose (-f FILENAME | TYPE NAME) [--port=port] [--protocol=TCP|UDP] [--target-port=number-or-name]
[--name=name] [--external-ip=external-ip-of-service] [--type=type] [options]

The "--port=3000" flag should come before "--type=NodePort" otherwise it isn't recognised. Similarly, the "--name" flag names the service which will be the same as the deployment's name by default anyway. Having it there for me for some reason threw an error:

Error from server (NotFound): deployments.extensions "—-name=deploy-react-kubernetes-service" not found.

I just removed it and it worked.

mofsal and others added 2 commits August 14, 2018 12:09
At least in version v1.11.1, the format for exposing a Kubernetes application is: 
Usage:
 kubectl expose (-f FILENAME | TYPE NAME) [--port=port] [--protocol=TCP|UDP] [--target-port=number-or-name]
[--name=name] [--external-ip=external-ip-of-service] [--type=type] [options]
The "--port=3000" flag should come before "--type=NodePort" otherwise it isn't recognised. Similarly, the "--name" flag names the service which will be the same as the deployment's name by default anyway. Having it there for me for some reason threw an error: 
Error from server (NotFound): deployments.extensions "—-name=deploy-react-kubernetes-service" not found.
I just removed it and it worked.
@rizchelwood rizchelwood merged commit 9805295 into IBM:master Dec 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Reviewers
1 more reviewer

@rizchelwood rizchelwood rizchelwood approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /