Create Deployment and Expose imperatively using a single line command

Here is how to create a deployment and exposing it using a single line command.

Jacksparrow:~ babatundeolu-isa$ kubectl run nginx --image=nginx --expose --port=80
service "nginx" created
deployment.apps "nginx" created
Jacksparrow:~ babatundeolu-isa$

At this point we have created an Nginx deployment and created a service for the deployment.

Leave a Reply

Your email address will not be published. Required fields are marked *