From the course: Automating Kubernetes with GitOps

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Using services

Using services

- All right, in this video, I want to give you a quick demo about services. I'm assuming you already know what services are all about, but just to be sure, I want to quickly demonstrate them. So here is what I'm going to show you. So to start with: kubectl create deploy webapp - -image=nginx --replicas =3. Then we are going to expose it using: kubectl expose deploy webapp --port=80 and --type=NodePort. And now it's exposed. So: kubectl get svc is showing that we have this webapp. The CLUSTER-IP address doesn't matter. What matters is the NodePort, that's the port that is exposed on the cluster nodes And the cluster nodes, in this case, is just one node, it's minikube machine. So I can use it on the minikube IP address, 49.2:31413. And as you can see, "Welcome to nginx." So that's what you need to know about services right now. You already knew that, right? Let's quickly continue in the next part about Ingress.

Contents