Pod name
Since we are working with a web server, using a proxy would make the most sense, as it will forward HTTP traffic through a URL based on the name of the Pod. Before we do that, we will use the port-forward command, which will be more relevant if what you're writing doesn't use the HTTP protocol.
The key thing you will need is the name of the Pod that was created. When we ran kubectl get pods earlier, you probably noticed that the name wasn't just flask, but included some additional characters in the name: flask-1599974757-b68pw. When we invoked kubectl run, it created a deployment, which consists of a Kubernetes ReplicaSet wrapped around a Pod. The first part of the name (flask) is from the deployment, the second part (1599974757 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access