Kubernetes 101 : Changing a service type
If we realize that our service, a ClusterIP doesn't suit our needs anymore, we could change its type to a nodePort service for example.
In our example, we have a service that exposes the "nginx" pods on the "port:80" as below:
We could create our service, using the below command:
The "kubectl edit" command opens a Yaml file in the text editor specified in the KUBE_EDITOR environment variable.
We could check our changes by looking at the Yaml file of our service, using the below command:
Comments