Accessing the Apps
Learn how we can use services to access an application deployed on Kubernetes.
We'll cover the following...
We'll cover the following...
Let’s have a look at the deploy.yml file from the previous lesson. We’ll execute all these commands from the below terminal. Click the "Run" button to create a cluster.
apiVersion: v1
kind: Service
metadata:
name: lb-svc
labels:
app: hello-world
spec:
type: LoadBalancer
ports:
- port: 8080
protocol: TCP
selector:
app: hello-worldPlayground
The Deployment is running, and we’ve got 10 replicas. However, we need a Kubernetes Service object to be able to connect to the app. We’ll cover Services in a later chapter, but for now, it’s enough to know that they provide network access to Pods.
The following YAML is from the lb.yml file. It defines a Service ...