[EN] Kubernetes Notes - Part 2

- 4 mins

Some kubernetes studies notes 🎉


Kubernetes

Concepts and Architecture

Master node components

Worker node

It provides a running environment for client applications

Components

Network

We can have pods communicating with other pods, containers inside pods communicating with each other, deployments communicating with each other, nodes communicatins with each other…

Kubernetes Networking

Kubernetes has an internal DNS You can set a resolved DNS like your-service-name.your-namespace-name.svc.cluster.local. The cluster.local means the internal host.

Services

They are the way we can expose the services to outside from kubernetes, it’s considerated as network abstraction, and kind a “physical portforward”.

The services receives a selector with the label, entry and exit port. We can choose which deployment or other workload are gonna be inside of the service through labels, with that we can aggregate the apps inside the same IP

Services

Types of service

Ingress

Ingress is a network workload, it exposes the application to the external world, also there is a set of rules to allow the entry in the cluster. For default, all external request outside from kubernet are blocked, but all request to outside are allowed. Always is related to a service, it never comes alone. The service redirects the traffic to the pods. It can add a digital certificate

Services

Ingress Controllers

Reverse Proxy

we receive requests from the users in one place, and the reverse proxy forwards the requests that the place received to the service.

What is ingress controllers?

It’s kind of a reverse proxy. It acts as a proxy and route to the pods. Also, it detects automatically new ingresses to add this new domain in an allowed list.

Port Forward

It gets a localhost port and forwards to an internal Kubernetes port

Namespaces

Namespaces are a logic division so that you can divide apps without they’re split by nodes. There are some default namespaces, such as kube-public, kube-system and default.

We can have different permissions for different roles as well

RBAC

RBAC means Role-based access control. It is a method of regulating access to computer or network resources based on the roles of individual users within your organization (access policies based per roles).

Namespaces

Secrets

It’s a file that you can add sensible data that will be encode to base-64. You can use the secrets as:

Secrets as a file Secrets as env

Config Maps

Very similar to secrets, but it’s simpler. The difference is the data isn’t encoded

ConfigMaps ConfigMaps as file ConfigMaps as env

the config maps propagate automatically to the pods. We can set the propagation type, the configmaps changes can be observer by the pods or it can have a TTL.

Sources:


Beatriz Uezu

Beatriz Uezu

Software Engineer

comments powered by Disqus
rss facebook twitter github youtube mail spotify lastfm instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora quora