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 - Kubernetes Tutorial
From the course: Automating Kubernetes with GitOps
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
-
-
-
-
-
-
-
-
-
-
(Locked)
Learning objectives41s
-
(Locked)
Using namespaces to represent GitOps environments1m 38s
-
(Locked)
Labels and annotations5m 57s
-
(Locked)
Using ConfigMaps to provide application data3m 58s
-
(Locked)
Kubernetes storage9m 7s
-
(Locked)
Using services1m 34s
-
(Locked)
Using Ingress9m 12s
-
(Locked)
Ingress access to services in specific namespaces5m 24s
-
(Locked)
Using NetworkPolicy to isolate GitOps environments6m 56s
-
(Locked)
-
-
-
-
-
-
-
-
-
-