From the course: Certified Kubernetes Administrator (CKA) Cert Prep
Fixing application access problems - Kubernetes Tutorial
From the course: Certified Kubernetes Administrator (CKA) Cert Prep
Fixing application access problems
- So the next type of trouble that we need to be able to fix is application access problems. Let's try to understand how that works. In fact, you should already know it. So to access applications that are running in the Pods, Surfaces as well as Ingress are used, normally you need both of them. The least you need is a Surface. So the Surface resource uses a selector label to connect to Pods with the matching label and the Ingress resource connects to a Surface and picks up its selector label to connect to the backend Pods directly. And the main troubleshooting is to check the labels in all of these resources if it doesn't work. So let me demonstrate how this works. I'm going to start with the kubectl and get ing, where we can see my app. So I'm going to use curl to myapp.io and what do I get? I'm getting nothing. Now, troubleshooting part one, can we ping it? So I'm using ping on myapp.io and there we can see, aha, myapp.io. It's coming with some weird IP address, which means that this is not doing what it needs to be doing. So let's fix that problem by using sudo vim on etc hosts. And where are we going to direct it to? Well, I am going to use myapp.io Now what is the ping test doing? The ping test is showing my local host 127.0.0.1. So let me try the curl again. And what is curl telling me? curl is telling me couldn't connect to server. Oh boy, couldn't connect to server. Well, let's figure out what might be wrong. I would say let's check on the Ingress resource. So kubectl describe ing, myapp. Now look at that. All of this is looking good. What I'm looking for is myapp.io and myapp.io is showing that it has a service backend, myapp:80 and most important, it has a couple of pulled backends and these pulled backends are sufficient proof that it should be running. Now what I would be interested in is the Surface backend. So kubectl get svc. So we have a problem on Ingress. I want to know if the Surface is doing it. Now to Surface myapp is ClusterIP, but I happen to be on the control note. So curl to 10.103.60.138 should work. And yeah, it works. It's telling me welcome to nginx. So the problem is in the Ingress resource, the problem is not in the configuration. The problem is not in the API. Aha. Do you remember? Ingress resource kubectl get pods - n kube system. Do we have any Ingress that is running here? Well, I don't see anything that looks like Ingress right here. And kubectl get ns. Maybe it has its own namespace. And oh, I do see an Ingress, nginx namespace. So now I'm using kubectl get all - n, ingress nginx and uh-oh. No resources found in the Ingress nginx namespace. So we have identified the problem and the problem is that apparently there is no Ingress controller running here.
Download courses and learn on the go
Watch courses on your mobile device without an internet connection. Download courses using your iOS or Android LinkedIn Learning app.
Contents
-
-
Module 1: Cluster architecture, installation, and configuration introduction36s
-
(Locked)
Learning objectives26s
-
(Locked)
Vanilla Kubernetes and the ecosystem2m 35s
-
(Locked)
Running Kubernetes in the cloud or on premises49s
-
(Locked)
Kubernetes distributions1m 35s
-
(Locked)
Kubernetes node roles3m 55s
-
-
-
(Locked)
Learning objectives46s
-
Understanding cluster node requirements2m 24s
-
(Locked)
Provisioning an infrastructure for hosting Kubernetes1m 44s
-
(Locked)
Installation procedure overview1m 20s
-
(Locked)
Configuring Linux kernel settings for Kubernetes networking2m 40s
-
(Locked)
Installing Container Runtime Interface (CRI) and tools4m 53s
-
(Locked)
Using kubeadm init6m
-
(Locked)
Configuring the Kubernetes client7m 47s
-
(Locked)
Setting up node networking5m 13s
-
(Locked)
Adding nodes to the cluster2m 54s
-
(Locked)
Using kubeadm init with a configuration file3m 56s
-
(Locked)
Lesson 2 lab challenge: Building a Kubernetes cluster31s
-
(Locked)
Lesson 2 lab solution: Building a Kubernetes cluster6m 4s
-
(Locked)
-
-
Learning objectives35s
-
Analyzing cluster nodes4m 52s
-
(Locked)
Using crictl to manage node containers4m 59s
-
(Locked)
Running static Pods4m 18s
-
(Locked)
Managing node state4m 44s
-
(Locked)
Managing node services4m 9s
-
(Locked)
Lesson 3 lab challenge: Running static Pods23s
-
(Locked)
Lesson 3 lab solution: Running static Pods1m 18s
-
-
-
Learning objectives50s
-
Using metrics server to monitor node and Pod performance5m 21s
-
(Locked)
Backing up the etcd7m 49s
-
(Locked)
Restoring the etcd6m 40s
-
(Locked)
Performing cluster node upgrades12m 15s
-
(Locked)
Performing cluster worker upgrades5m 42s
-
(Locked)
Understanding cluster high availability (HA) options14m 21s
-
(Locked)
Setting up a highly available Kubernetes cluster7m 32s
-
(Locked)
Lesson 4 lab challenge: etcd backup and restore23s
-
(Locked)
Lesson 4 lab solution: etcd backup and restore4m 36s
-
-
-
(Locked)
Learning objectives47s
-
(Locked)
Understanding API access3m 21s
-
Managing security context4m 48s
-
(Locked)
Users, service accounts, and API access1m 44s
-
(Locked)
Understanding role-based access control (RBAC)2m 1s
-
(Locked)
Setting up RBAC for service accounts10m 32s
-
(Locked)
Configuring cluster roles and RoleBindings1m 34s
-
(Locked)
Setting up RBAC for users13m 49s
-
(Locked)
Lesson 5 lab challenge: Managing security21s
-
(Locked)
Lesson 5 lab solution: Managing security2m 11s
-
(Locked)
-
-
(Locked)
Module 2: Workloads and scheduling introduction27s
-
(Locked)
Learning objectives36s
-
(Locked)
Using deployments3m 31s
-
(Locked)
Running agents with DaemonSets2m 47s
-
Using StatefulSets6m 54s
-
(Locked)
The case for running individual Pods1m 9s
-
(Locked)
Managing Pod initialization3m 37s
-
(Locked)
Scaling applications3m 9s
-
(Locked)
Configuring autoscaling7m 49s
-
(Locked)
Using sidecar containers for application logging9m 30s
-
(Locked)
Lesson 6 lab challenge: Running a DaemonSet19s
-
(Locked)
Lesson 6 lab solution: Running a DaemonSet1m 33s
-
(Locked)
-
-
(Locked)
Learning objectives25s
-
(Locked)
Running applications from YAML files59s
-
(Locked)
The Helm package manager10m 58s
-
(Locked)
Creating a template from a Helm chart5m 55s
-
(Locked)
Managing applications with Helm6m 14s
-
Using kustomize4m 52s
-
(Locked)
Lesson 7 lab challenge: Managing applications with Helm16s
-
(Locked)
Lesson 7 lab solution: Managing applications with Helm4m 8s
-
(Locked)
-
-
(Locked)
Learning objectives46s
-
(Locked)
Exploring the scheduling process2m 32s
-
(Locked)
Setting node preferences3m 10s
-
(Locked)
Managing affinity and anti-affinity rules10m 21s
-
(Locked)
Managing taints and tolerations8m 33s
-
Configuring resource limits and requests2m 8s
-
(Locked)
Setting namespace quota6m 37s
-
(Locked)
Configuring LimitRange3m 12s
-
(Locked)
Configuring Pod priorities5m 5s
-
(Locked)
Lesson 8 lab challenge: Configuring taints43s
-
(Locked)
Lesson 8 lab solution: Configuring taints3m 42s
-
(Locked)
-
-
(Locked)
Module 3: Services and networking introduction19s
-
(Locked)
Learning objectives46s
-
(Locked)
Exploring Kubernetes networking6m 34s
-
(Locked)
Understanding network plugins2m 50s
-
(Locked)
Using services to access applications4m 19s
-
(Locked)
Running an ingress controller10m 47s
-
(Locked)
Configuring ingress7m 20s
-
(Locked)
Using port forwarding for direct application access2m 19s
-
(Locked)
Understanding gateway API3m 38s
-
(Locked)
Configuring gateway API4m 4s
-
(Locked)
Using gateway API to provide access to applications10m 6s
-
(Locked)
Configuring gateway API for TLS access10m 15s
-
(Locked)
Lesson 9 lab challenge: Managing networking22s
-
(Locked)
Lesson 9 lab solution: Managing networking3m 51s
-
(Locked)
-
-
(Locked)
Learning objectives38s
-
(Locked)
Managing the Container Network Interface (CNI) and network plugins3m 58s
-
(Locked)
Understanding service auto registration and Kubernetes DNS6m 26s
-
(Locked)
Using NetworkPolicies to manage traffic between Pods6m 4s
-
(Locked)
Configuring NetworkPolicies to manage traffic between namespaces9m 40s
-
(Locked)
Managing CoreDNS49s
-
(Locked)
Lesson 10 lab challenge: Using NetworkPolicies47s
-
(Locked)
Lesson 10 lab solution: Using NetworkPolicies5m 27s
-
(Locked)
-
-
(Locked)
Module 4: Storage introduction26s
-
(Locked)
Learning objectives37s
-
(Locked)
Understanding Kubernetes storage options2m 48s
-
(Locked)
Accessing storage through Pod volumes2m 55s
-
(Locked)
Configuring PersistentVolume (PV) storage4m 34s
-
(Locked)
Configuring PersistentVolumeClaims (PVCs)2m 49s
-
(Locked)
Configuring Pod storage with PVs and PVCs2m 55s
-
(Locked)
Using volume reclaim policies1m 27s
-
Using ConfigMaps and secrets as volumes6m 59s
-
(Locked)
Lesson 11 lab challenge: Setting up storage41s
-
(Locked)
Lesson 11 lab solution: Setting up storage6m 47s
-
(Locked)
-
-
(Locked)
Learning objectives28s
-
(Locked)
Using StorageClass2m 20s
-
(Locked)
Understanding storage provisioners1m 47s
-
(Locked)
Setting up a NFS storage provisioner11m 28s
-
(Locked)
Lesson 12 lab challenge: Using the hostpath storage provisioner50s
-
(Locked)
Lesson 12 lab solution: Using the hostpath storage provisioner4m 37s
-
(Locked)
-
-
(Locked)
Module 5: Troubleshooting introduction16s
-
(Locked)
Learning objectives30s
-
(Locked)
Monitoring Kubernetes resources1m 24s
-
(Locked)
Understanding the troubleshooting flow5m 32s
-
(Locked)
Troubleshooting Kubernetes applications2m 24s
-
(Locked)
Troubleshooting cluster nodes7m 55s
-
Fixing application access problems3m 41s
-
(Locked)
Lesson 13 lab challenge: Troubleshooting nodes19s
-
(Locked)
Lesson 13 lab solution: Troubleshooting nodes1m 56s
-
(Locked)
-
-
(Locked)
Learning objectives40s
-
(Locked)
Questions overview3m 58s
-
(Locked)
Configuring a highly available Kubernetes cluster9m 17s
-
(Locked)
Scheduling a Pod5m 22s
-
(Locked)
Managing application initialization2m 52s
-
(Locked)
Setting up persistent storage1m 55s
-
(Locked)
Configuring application access2m 57s
-
(Locked)
Securing network traffic8m 31s
-
(Locked)
Setting up a quota5m 46s
-
(Locked)
Creating a static Pod2m 6s
-
(Locked)
Troubleshooting node services1m 40s
-
(Locked)
Configuring cluster access5m 50s
-
(Locked)
Configuring taints and tolerations5m 9s
-
(Locked)
-
-
(Locked)
Learning objectives27s
-
(Locked)
Questions overview4m 15s
-
(Locked)
Creating a cluster3m 24s
-
(Locked)
Performing a control node upgrade5m 8s
-
(Locked)
Configuring application logging8m 23s
-
(Locked)
Managing PVCs9m 41s
-
(Locked)
Investigating Pod logs1m 27s
-
(Locked)
Analyzing performance3m 27s
-
(Locked)
Managing application scheduling2m 28s
-
(Locked)
Configuring ingress3m 17s
-
(Locked)
Preparing for node maintenance1m 36s
-
(Locked)
Scaling applications1m 42s
-
(Locked)
etcd backup and restore5m 23s
-
(Locked)