Production-Grade Container Scheduling and Management

Kubernetes (K8s)

GoPkg Widget CII Best Practices


Kubernetes, also known as K8s, is an open source system for managing containerized applications across multiple hosts. It provides basic mechanisms for deployment, maintenance, and scaling of applications.

Kubernetes builds upon a decade and a half of experience at Google running production workloads at scale using a system called Borg, combined with best-of-breed ideas and practices from the community.

Kubernetes is hosted by the Cloud Native Computing Foundation (CNCF). If your company wants to help shape the evolution of technologies that are container-packaged, dynamically scheduled, and microservices-oriented, consider joining the CNCF. For details about who's involved and how Kubernetes plays a role, read the CNCF announcement.


To start using K8s

See our documentation on kubernetes.io.

Try our interactive tutorial.

Take a free course on Scalable Microservices with Kubernetes.

To use Kubernetes code as a library in other applications, see the list of published components. Use of the k8s.io/kubernetes module or k8s.io/kubernetes/... packages as libraries is not supported.

To start developing K8s

The community repository hosts all information about building Kubernetes from source, how to contribute code and documentation, who to contact about what, etc.

If you want to build Kubernetes right away there are two options:

You have a working Go environment.
mkdir -p $GOPATH/src/k8s.io
cd $GOPATH/src/k8s.io
git clone https://github.com/kubernetes/kubernetes
cd kubernetes
make
You have a working Docker environment.
git clone https://github.com/kubernetes/kubernetes
cd kubernetes
make quick-release

For the full story, head over to the developer's documentation.

Support

If you need support, start with the troubleshooting guide, and work your way through the process that we've outlined.

That said, if you have questions, reach out to us one way or another.

Comments
  • Automated cherry pick of #114326: Add pod to dsw if termination is not completed during

    Automated cherry pick of #114326: Add pod to dsw if termination is not completed during

    Cherry pick of #114326 on release-1.24.

    #114326: Add pod to dsw if termination is not completed during

    For details on the cherry pick process, see the cherry pick requests page.

    NONE
    
  • Automated cherry pick of #114326: Add pod to dsw if termination is not completed during

    Automated cherry pick of #114326: Add pod to dsw if termination is not completed during

    Cherry pick of #114326 on release-1.25.

    #114326: Add pod to dsw if termination is not completed during

    For details on the cherry pick process, see the cherry pick requests page.

    NONE
    
    
  • WIP: logs: add AddGoFlags

    WIP: logs: add AddGoFlags

    What type of PR is this?

    /kind feature

    What this PR does / why we need it:

    This makes it possible to use logging command line flags with a flag.FlagSet, without having to copy values from a pflag.FlagSet.

    Special notes for your reviewer:

    WIP because https://github.com/kubernetes/kubernetes/pull/114680 needs to be merged first. Only the last commit is specific to this PR.

    Does this PR introduce a user-facing change?

    k8s.io/component-base/logs now also supports adding command line flags to a flag.FlagSet.
    
  • Automated cherry pick of #114326: Add pod to dsw if termination is not completed during

    Automated cherry pick of #114326: Add pod to dsw if termination is not completed during

    Cherry pick of #114326 on release-1.26.

    #114326: Add pod to dsw if termination is not completed during

    For details on the cherry pick process, see the cherry pick requests page.

    NONE
    
  • Pods keep being created by Deployment with match-all

    Pods keep being created by Deployment with match-all "NoSchedule" toleration until node shutdown when using graceful node shutdown

    What happened?

    When graceful node shutdown is triggered, kubelet will taint the node with "not-ready", set "spec.unschedulable" to true, and set running pods' phase to "Failed" (I'm using 1.23.6 and 1.24 where the phase will be set to "Failed" according to https://github.com/kubernetes/kubernetes/pull/106900).

    Meanwhile, the shutdown manager also will reject any new pod with "Failed" phase which is scheduled to the node due to the code I believe at https://github.com/kubernetes/kubernetes/blob/release-1.24/pkg/kubelet/nodeshutdown/nodeshutdown_manager_linux.go#L143-L154.

    With above behavior, if a controller instance like Deployment with match-all "NoSchedule" toleration (toleration without setting the key), the Deployment will create a new pod once the old one is set to "Failed" and the scheduler may still schedule the new pod to the node being shutting down because of the toleration. As the kubelet rejects the new coming pod and also set its phase to "Failed", the former procedure just repeats leading to a lot of rejected pods being created until node truly shutdown. And we know those pods will stay until garbage collection or other entity kick-in to clean up.

    This may leave a certain way to exhaust the cluster resource as the pod creating can be much faster than cleaning up.

    What did you expect to happen?

    (Since this) I'm aware of that have a match-all "NoSchedule" toleration on things like Deployment is a bad idea but sometimes it can just happen. And I also know there is back-and-forth discussion on whether the phase should be set to "Failed" on the pod during graceful node shutdown (https://github.com/kubernetes/kubernetes/issues/104531) and there is still work ongoing (https://github.com/kubernetes/kubernetes/issues/108991).

    Our case is we still need the new pod instance can be created after node reboot (so completed pod staying forever is not fine for us either), but at the same time hope it won't be scheduled to the same node being shutting down. I think the thing is that scheduler's logic always respects taints and tolerations but kubelet doesn't in this case.

    So the best wish is that scheduler can be smart enough never schedule a new pod to the node being shutting down (of cause when graceful node shutdown is applied) regardless of what toleration the pod has. If this is impossible, I wish at least kubelet also subjects to the toleration as scheduler does similar to when the node is cordoned.

    How can we reproduce it (as minimally and precisely as possible)?

    Deploy a deployment with a match-all "NoSchedule" toleration (and probably as many replicas as the number of nodes). Do "systemctl reboot" on a node with "GracefulNodeShutdown" enabled. Make sure it will take long enough time like minutes for node to shutdown.

    Anything else we need to know?

    No response

    Kubernetes version

    $ kubectl version
    
    WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
    Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.2", GitCommit:"60d6794382fe229fcf97000e8175c0315ebe8863", GitTreeState:"clean", BuildDate:"2022-09-09T08:41:07Z", GoVersion:"go1.18.3", Compiler:"gc", Platform:"linux/amd64"}
    Kustomize Version: v4.5.4
    Server Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.2", GitCommit:"60d6794382fe229fcf97000e8175c0315ebe8863", GitTreeState:"clean", BuildDate:"2022-09-09T08:30:58Z", GoVersion:"go1.18.3", Compiler:"gc", Platform:"linux/amd64"}
    

    Cloud provider

    on-premise

    OS version

    # On Linux:
    $ cat /etc/os-release
    NAME="Ubuntu"
    VERSION="18.04.5 LTS (Bionic Beaver)"
    ID=ubuntu
    ID_LIKE=debian
    PRETTY_NAME="Ubuntu 18.04.5 LTS"
    VERSION_ID="18.04"
    HOME_URL="https://www.ubuntu.com/"
    SUPPORT_URL="https://help.ubuntu.com/"
    BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
    PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
    VERSION_CODENAME=bionic
    UBUNTU_CODENAME=bionic
    $ uname -a
    Linux node-10-158-32-30 5.4.0-70-generic #78~18.04.1-Ubuntu SMP Sat Mar 20 14:10:07 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
    
    # On Windows:
    C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
    # paste output here
    

    Install tools

    kubeadm 1.24.2

    Container runtime (CRI) and version (if applicable)

    containerd github.com/containerd/containerd v1.6.6 10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1

    Related plugins (CNI, CSI, ...) and versions (if applicable)

    not related
  • Automated cherry pick of #114464: Set permissions on volume before publishing update

    Automated cherry pick of #114464: Set permissions on volume before publishing update

    Cherry pick of #114464 on release-1.26.

    #114464: Set permissions on volume before publishing update

    For details on the cherry pick process, see the cherry pick requests page.

    
    
Container Storage Interface driver for Synology NAS

Synology CSI Driver for Kubernetes The official Container Storage Interface driver for Synology NAS. Container Images & Kubernetes Compatibility Drive

Jan 5, 2023
Next generation distributed, event-driven, parallel config management!
Next generation distributed, event-driven, parallel config management!

mgmt: next generation config management! About: Mgmt is a real-time automation tool. It is familiar to existing configuration management software, but

Dec 26, 2022
cloud-native local storage management system
cloud-native local storage management system

Open-Local是由多个组件构成的本地磁盘管理系统,目标是解决当前 Kubernetes 本地存储能力缺失问题。通过Open-Local,使用本地存储会像集中式存储一样简单。

Dec 30, 2022
Experiment - Sync files to S3, fast. Go package and CLI.

gosync I want to be the fastest way to concurrently sync files and directories to/from S3. Gosync will concurrently transfer your files to and from S3

Nov 3, 2022
Run the same Docker images in AWS Lambda and AWS ECS
Run the same Docker images in AWS Lambda and AWS ECS

serverlessish tl;dr Run the exact same image for websites in Lambda as you do in ECS, Kubernetes, etc. Just add this to your Dockerfile, listen on por

Dec 22, 2022
JuiceFS is a distributed POSIX file system built on top of Redis and S3.
JuiceFS is a distributed POSIX file system built on top of Redis and S3.

JuiceFS is an open-source POSIX file system built on top of Redis and object storage (e.g. Amazon S3), designed and optimized for cloud native environ

Jan 2, 2023
Cloud cost estimates for Terraform in your CLI and pull requests 💰📉
Cloud cost estimates for Terraform in your CLI and pull requests 💰📉

Infracost shows cloud cost estimates for Terraform projects. It helps developers, devops and others to quickly see the cost breakdown and compare different options upfront.

Jan 2, 2023
Fleex allows you to create multiple VPS on cloud providers and use them to distribute your workload.
Fleex allows you to create multiple VPS on cloud providers and use them to distribute your workload.

Fleex allows you to create multiple VPS on cloud providers and use them to distribute your workload. Run tools like masscan, puredns, ffuf, httpx or anything you need and get results quickly!

Jan 6, 2023
☁️🏃 Get up and running with Go on Google Cloud.

Get up and running with Go and gRPC on Google Cloud Platform, with this lightweight, opinionated, batteries-included service SDK.

Dec 20, 2022
Elkeid is a Cloud-Native Host-Based Intrusion Detection solution project to provide next-generation Threat Detection and Behavior Audition with modern architecture.
Elkeid is a Cloud-Native Host-Based Intrusion Detection solution project to provide next-generation Threat Detection and Behavior Audition with modern architecture.

Elkeid is a Cloud-Native Host-Based Intrusion Detection solution project to provide next-generation Threat Detection and Behavior Audition with modern architecture.

Dec 30, 2022
Sample apps and code written for Google Cloud in the Go programming language.
Sample apps and code written for Google Cloud in the Go programming language.

Google Cloud Platform Go Samples This repository holds sample code written in Go that demonstrates the Google Cloud Platform. Some samples have accomp

Jan 9, 2023
Use Google Cloud KMS as an io.Reader and rand.Source.

Google Cloud KMS Go io.Reader and rand.Source This package provides a struct that implements Go's io.Reader and math/rand.Source interfaces, using Goo

Dec 1, 2022
A Cloud Native Buildpack that contributes SDKMAN and uses it to install dependencies like the Java Virtual Machine

gcr.io/paketo-buildpacks/sdkman A Cloud Native Buildpack that contributes SDKMAN and uses it to install dependencies like the Java Virtual Machine. Be

Jan 8, 2022
Microshift is a research project that is exploring how OpenShift1 Kubernetes can be optimized for small form factor and edge computing.

Microshift is a research project that is exploring how OpenShift1 Kubernetes can be optimized for small form factor and edge computing.

Nov 1, 2021
Contentrouter - Protect static content via Firebase Hosting with Cloud Run and Google Cloud Storage

contentrouter A Cloud Run service to gate static content stored in Google Cloud

Jan 2, 2022
A Cloud Foundry cli plugin that offers a faster and customizable alternative for cf apps

Panzer cf cli plugin A plugin for faster interaction (less API calls) with Cloud Foundry, and choose the columns you want in your output. Instead of "

Feb 14, 2022
Production-Grade Container Scheduling and Management
Production-Grade Container Scheduling and Management

Kubernetes (K8s) Kubernetes, also known as K8s, is an open source system for managing containerized applications across multiple hosts. It provides ba

Jan 2, 2023
Enterprise-grade container platform tailored for multicloud and multi-cluster management
Enterprise-grade container platform tailored for multicloud and multi-cluster management

KubeSphere Container Platform What is KubeSphere English | 中文 KubeSphere is a distributed operating system providing cloud native stack with Kubernete

Jan 2, 2023
A Crypto-Secure, Production-Grade Reliable-UDP Library for golang with FEC
 A Crypto-Secure, Production-Grade Reliable-UDP Library for golang with FEC

Introduction kcp-go is a Production-Grade Reliable-UDP library for golang. This library intents to provide a smooth, resilient, ordered, error-checked

Dec 28, 2022
Vektor - Build production-grade web services quickly
Vektor - Build production-grade web services quickly

Vektor enables development of modern web services in Go. Vektor is designed to simplify the development of web APIs by eliminating boilerplate, using secure defaults, providing plug-in points, and offering common pieces needed for web apps. Vektor is fairly opinionated, but aims to provide flexibility in the right places.

Dec 15, 2022