luksa/kubernetes-in-action

2.3.2 - Can't create Service object because no rc

TigrekTechnologies opened this issue · 0 comments

The following app deployment code in 2.3.1 doesn't work because the generator flag has been deprecated:

kubectl run kubia --image=luksa/kubia --port=8080 --generator=run/v1

Therefore, we are forced to run the command without that flag, as follows:

kubectl run kubia --image=luksa/kubia --port=8080

This means that we don't end up creating a ReplicationController and thus, the following code from 2.3.2 for deploying a Service object of type LoadBalancer doesn't work:

k expose rc kubia --type=LoadBalancer --name kubia-http

What is the correct way to run the code from 2.3.1 to create a ReplicationController that would allow us to follow along with the remaining examples in the chapter?