Files
awesome-kubernetes/docs/kubernetes.md
Inaki Fernandez 9ef5305399 Sept 24th
2021-09-24 10:16:06 +02:00

148 KiB
Raw Blame History

Kubernetes. "Kubernetes is not for application development but for platform development" (Kelsey Hightower)

Introduction

Kubernetes magic is in enterprise standardization, not app portability 🌟

Kubernetes Jobs Market

  • kube.careers: Kubernetes jobs market (Q2 2021) We analyzed all the 113 Kubernetes jobs posted in the past 3 months (Apr-May-Jun 2021) and extracted metrics for:
    • Kubernetes salary ranges
    • Remote vs office offers
    • Popular cloud providers

Certified Kubernetes Offerings

The State of Cloud-Native Development

Kubernetes Failure Stories

Kubernetesbyexample

  • kubernetesbyexample.com 🌟🌟 A free learning platform covering the fundamentals of how to develop, deploy, manage, and automate containers in cloud-native environments.

Kubernetes Knowledge Hubs

Kubernetes Blogs

Spanish Kubernetes Blogs

Kubernetes Open Source Container Orchestation

kubeconfig

Docker and Kubernetes

Kubernetes Cloud Controller Manager

Kubernetes Resources

Kubernetes Pods

Kubernetes ConfigMaps

Kubernetes Secrets

Kubernetes Volumes

Namespaces and Multi Tenancy. Self Service Namespaces

Creating Users
  • cloudhero.io Creating Users for your Kubernetes Cluster. Learn how to use x509 certificates to authenticate users in your cluster.

Kubernetes Labels and Selectors

Kubernetes Taints and Tolerations

Kubernetes Deployment, Rollling Updates and Rollbacks

Kubernetes StatefulSet

Kubernetes Jobs and Cron Jobs

Kubernetes Deployment Strategies

Kubernetes API

Kubernetes Health Checks/Probes. Startup, Liveness, Readiness

Kubernetes Limits

Kube Scheduler

Kubernetes etcd

Kubernetes Sidecars

Kubernetes Annotations

Kubernetes Best Practices and Tips

Disruptions

Cost Estimation Strategies

kubecost

Kubernetes Resource and Capacity Management. Capacity Planning

Kubernetes Monitoring

Logging in Kubernetes

ECK Elastic Cloud on Kubernetes

Architecting Kubernetes clusters. Node Size. Multi Clusters and Hybrid Cloud

Client Libraries for Kubernetes

Helm Kubernetes Tool

Templating YAML in Kubernetes with real code. YQ YAML processor

Quality Checks for Kubernetes YAMLs

Extending Kubernetes

Adding Custom Resources. Extending Kubernetes API with Kubernetes Resource Definitions. CRD vs Aggregated API

  • Custom Resources
  • itnext.io: CRD is just a table in Kubernetes
  • Use a custom resource (CRD or Aggregated API) if most of the following apply:
    • You want to use Kubernetes client libraries and CLIs to create and update the new resource.
    • You want top-level support from kubectl; for example, kubectl get my-object object-name.
    • You want to build new automation that watches for updates on the new object, and then CRUD other objects, or vice versa.
    • You want to write automation that handles updates to the object.
    • You want to use Kubernetes API conventions like .spec, .status, and .metadata.
    • You want the object to be an abstraction over a collection of controlled resources, or a summarization of other resources.
  • Kubernetes provides two ways to add custom resources to your cluster:
    • CRDs are simple and can be created without any programming.
    • API Aggregation requires programming, but allows more control over API behaviors like how data is stored and conversion between API versions.
  • Kubernetes provides these two options to meet the needs of different users, so that neither ease of use nor flexibility is compromised.
  • Aggregated APIs are subordinate API servers that sit behind the primary API server, which acts as a proxy. This arrangement is called API Aggregation (AA). To users, it simply appears that the Kubernetes API is extended.
  • CRDs allow users to create new types of resources without adding another API server. You do not need to understand API Aggregation to use CRDs.
  • Regardless of how they are installed, the new resources are referred to as Custom Resources to distinguish them from built-in Kubernetes resources (like pods).

Krew, a plugin manager for kubectl plugins

  • Krew is the plugin manager for kubectl command-line tool.

  • itnext.io: Extending Kubernetes Cluster; Kubectl Plugins and Krew

  • darumatic.com: Improve Kubectl Command with Krew Krew is a tool that aims to ease plugin discovery, installation, upgrade, and removal on multiple operating systems. This article will show you how easy it is to grab and experiment with existing plugins.

  • kubectl trace is now on the krew index!! Go install it now!

    kubectl krew install trace
    

    And then just try to snoop into all the file openings:

    kubectl trace run -a  <yournode>  -e 'kprobe:do_sys_open { printf("%s: %s\n", comm, str(arg1)) }'
    

OpenKruise/Kruise

Crossplane, a Universal Control Plane API for Cloud Computing. Crossplane Workloads Definitions

Kubernetes Community

Community Forums

Kubernetes Special Interest Groups (SIGs)

Kubernetes SIG's Repos

Kubectl Plugins


Enforcing Policies and governance for kubernetes workloads with Conftest

Kubernetes Troubleshooting

[![learnk8s debug your pods](images/learnk8s_debug_your_pods.png){: style="width:30%"}](https://learnk8s.io/troubleshooting-deployments)

Provisioning cloud resources (AWS, GCP, Azure) in Kubernetes

Debugging Techniques and Strategies. Debugging with ephemeral containers

Kubernetes Tutorials

Online Training

K8s Diagrams

Kubernetes Patterns and Antipatterns. Service Discovery

Top 10 Kubernetes patterns

Kubernetes Scheduling and Scheduling Profiles

Assigning Pods to Nodes. Pod Affinity and Anti-Affinity

Pod Topology Spread Constraints and PodTopologySpread Scheduling Plugin

Cloud Development Kit (CDK) for Kubernetes

  • cdk8s.io Define Kubernetes apps and components using familiar languages. cdk8s is an open-source software development framework for defining Kubernetes applications and reusable abstractions using familiar programming languages and rich object-oriented APIs. cdk8s apps synthesize into standard Kubernetes manifests which can be applied to any Kubernetes cluster.
  • github.com/awslabs/cdk8s

AWS Cloud Development Kit (AWS CDK)

  • AWS: Introducing CDK for Kubernetes
  • Traditionally, Kubernetes applications are defined with human-readable, static YAML data files which developers write and maintain. Building new applications requires writing a good amount of boilerplate config, copying code from other projects, and applying manual tweaks and customizations. As applications evolve and teams grow, these YAML files become harder to manage. Sharing best practices or making updates involves manual changes and complex migrations.
  • YAML is an excellent format for describing the desired state of your cluster, but it is does not have primitives for expressing logic and reusable abstractions. There are multiple tools in the Kubernetes ecosystem which attempt to address these gaps in various ways:
  • We realized this was exactly the same problem our customers had faced when defining their applications through CloudFormation templates, a problem solved by the AWS Cloud Development Kit (AWS CDK), and that we could apply the same design concepts from the AWS CDK to help all Kubernetes users.

Serverless with OpenFaas and Knative

[![Serverless](images/from-monolith-to-serverless.jpg)](https://www.xenonstack.com/blog/serverless-openfaas-java/)

Multi-Cluster Federation. Hybrid Cloud Setup Tools

KubeFed

KubeCarrier

Red Hat Operator Lifecycle Manager (OLM)

  • Red Hat OLM operator-lifecycle-manager is a management framework for extending Kubernetes with Operators. OLM extends Kubernetes to provide a declarative way to install, manage, and upgrade Operators and their dependencies in a cluster.

Istio Service Mesh

Kubernetes Scripts

Kubernetes and Ansible

Spot instances in Kubernetes

Kubernetes Incident Report Plan IRP

Kubernetes interview questions

Certified Kubernetes Application Developer (CKAD)

Books and eBooks

Kubernetes Patterns eBooks

Famous Kubernetes ebooks of 2019

[![Kubernetes: Up and Running](images/kubernetes_up_running_kelsey_hightower.gif)](http://shop.oreilly.com/product/0636920223788.do)

Famous Kubernetes resources of 2019

Famous Kubernetes resources of 2020

Kubernetes Slack Channel

Bunch of images

Click to expand!

Kubernetes architecture

10 most common mistakes{: style="width:60%"}

5 Open-source projects that make #Kubernetes even better{: style="width:80%"}

kubernetes arch multicloud hybrid{: style="width:70%"}

Kubernetes components

Container flowchart

Videos

Click to expand!

Tweets

Click to expand!

Can you change an application without changing any code in Kubernetes?

You can when you use multiple containers in a single Pod.

Heres a visual recap of @EmanuelMEvans s article on extending apps on Kubernetes with multi-container pods https://t.co/afS3pPj4zb pic.twitter.com/LS5zOZErbE

— Daniele Polencic (@danielepolencic) March 1, 2021
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

What if you could choose the best node for your Kubernetes cluster before writing any code?

I built a calculator to choose the optimal instance sizing for your Kubernetes clusterhttps://t.co/3jlyCLrvdq

Discover:

- costs (used, wasted, kubelet)
- overcommitment
- utilisation pic.twitter.com/gdRTEWkez6

— Daniele Polencic (@danielepolencic) September 7, 2021
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

THREAD: What happens when you create a Pod in Kubernetes?

Spoiler: a surprisingly simple task reveals a complicated workflow that touches several components in the cluster. pic.twitter.com/SNEufo0lBe

— Daniele Polencic (@danielepolencic) August 6, 2020
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

THREAD: How to quarantine a Pod in Kubernetes.

This technique helps you with debugging running Pods in production.

The Pod is detached from the Service (no traffic), and you can troubleshoot it live.

Let's get started! pic.twitter.com/E7AUh2ylM7

— Daniele Polencic (@danielepolencic) June 24, 2020
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

THREAD: How to gracefully shut down Pods without dropping production traffic in Kubernetes

If you've ever noticed dropped connection after a rolling upgrade, this thread digs into the details.

Let's start: 𝘸𝘩𝘢𝘵 𝘩𝘢𝘱𝘱𝘦𝘯𝘴 𝘸𝘩𝘦𝘯 𝘢 𝘗𝘰𝘥 𝘪𝘴 𝘥𝘦𝘭𝘦𝘵𝘦𝘥? pic.twitter.com/jS5litVUlw

— Daniele Polencic (@danielepolencic) July 6, 2020
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

THREAD: How does the scheduler work in Kubernetes?

The scheduler is in charge of deciding where your pods are deployed in the cluster.

It might sound like an easy job, but it's rather complicated!

Let's dive into it. pic.twitter.com/iC1vnargc4

— Daniele Polencic (@danielepolencic) September 24, 2020
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

MEGATHREAD

Learn Kubernetes one Twitter thread at the time!

Below you can find a collection of threads about Kubernetes and Kubernetes-related tech!

I regularly add more, so you can follow me or @learnk8s for more updates! pic.twitter.com/0ingxHn9vx

— Daniele Polencic (@danielepolencic) August 26, 2020
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

THREAD

Running new apps in Kubernetes is straightforward.

But what happens when you have legacy apps that:

- Log to file instead of stdout?
- Has no support Prometheus?
- Has no support for HTTPS

Read on → pic.twitter.com/m79f69Huqw

— Daniele Polencic (@danielepolencic) February 22, 2021
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

I'm often asked why I prefer zonal Kubernetes clusters over regional clusters. @gctaylor does a great job explaining how @reddit leverages zonal clusters to limit the blast radius of config changes and reduce cross AZ network traffic. https://t.co/3pW5awTtdQ

— Kelsey Hightower (@kelseyhightower) March 18, 2021
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

THREAD

How do you scale background jobs in Kubernetes?

With Python, Celery, RabbitMQ and KEDA! pic.twitter.com/BOtwiSjIKW

— Daniele Polencic (@danielepolencic) March 29, 2021
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Architecting #Kubernetes clusters: Should you use a single cluster or many clusters for your team(s)?

There are pros and cons to both, read the thread to find out more 🧵 pic.twitter.com/1n5ACO97Ay

— appvia (@appvia_io) August 17, 2021
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Unpopular opinion: Kubernetes doesn't have a clear separation between admin and app developer APIs, and we acknowledged this as a source of complexity but maybe this is why it became successful.

— Jaana Dogan ヤナ ドガン (@rakyll) September 9, 2021
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Kubernetes saved us from a world of completely proprietary Cloud APIs and provided a trustworthy basis for an open ecosystem of infrastructure tools and APIs. https://t.co/i67orzir2O

— Ian Lewis 💉💉 (@IanMLewis) September 11, 2021
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

As more enterprises embrace #containers, theyll find they need #Kubernetes, too. With our open approach, #K8s does more. Heres how: https://t.co/y9TciK53F1 pic.twitter.com/CPWHcy5TOZ

— Nicholas Gerasimatos - Red Hat (@nicholas_redhat) September 23, 2021
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-168051035-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-168051035-1'); </script>