All Projects → linuxkit → Kubernetes

linuxkit / Kubernetes

Licence: apache-2.0
minimal and immutable Kubernetes images built with LinuxKit

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Kubernetes

drone-cleanup
Clean up completed drone.io jobs and pods from the Kubernetes cluster
Stars: ✭ 25 (-92.67%)
Mutual labels:  kubernetes-deployment
sentry-k8s
Sentry for Kubernetes
Stars: ✭ 25 (-92.67%)
Mutual labels:  kubernetes-deployment
K8s Kotlin Dsl
Kotlin DSL for Kubernetes configs
Stars: ✭ 259 (-24.05%)
Mutual labels:  kubernetes-deployment
terraform-vultr-condor
Kubernetes Deployment Tool for Vultr
Stars: ✭ 60 (-82.4%)
Mutual labels:  kubernetes-deployment
spring-boot-microservice-best-practices
Best practices and integrations available for Spring Boot based Microservice in a single repository.
Stars: ✭ 139 (-59.24%)
Mutual labels:  kubernetes-deployment
Learn-ServiceMesh-Workshop
Labs for Kubecon NA Workshop on Service Mesh with Cloud PKS
Stars: ✭ 13 (-96.19%)
Mutual labels:  kubernetes-deployment
Project
Infrastructure
Stars: ✭ 43 (-87.39%)
Mutual labels:  kubernetes-deployment
Kubernetes Workshop
⚙️ A Gentle introduction to Kubernetes with more than just the basics. 🌟 Give it a star if you like it.
Stars: ✭ 3,122 (+815.54%)
Mutual labels:  kubernetes-deployment
ankh
Another Kubernetes Helper
Stars: ✭ 31 (-90.91%)
Mutual labels:  kubernetes-deployment
Kubernetes Tutorial
Running Kubernetes cluster Locally tutorial
Stars: ✭ 257 (-24.63%)
Mutual labels:  kubernetes-deployment
pipeline-lib
Global shared library for Glia pipeline jobs
Stars: ✭ 68 (-80.06%)
Mutual labels:  kubernetes-deployment
aws-eks-orb
An orb to simplify deployments to Amazon Elastic Container Service for Kubernetes (Amazon EKS)
Stars: ✭ 16 (-95.31%)
Mutual labels:  kubernetes-deployment
cd-gitops-reference-architecture
Details of the CD/GitOps architecture in use at InfluxData
Stars: ✭ 16 (-95.31%)
Mutual labels:  kubernetes-deployment
ansible-role-k8s
This role render an arbitrary number of Jinja2 templates and deploys or removes them to/from Kubernetes clusters.
Stars: ✭ 26 (-92.38%)
Mutual labels:  kubernetes-deployment
Eksctl
The official CLI for Amazon EKS
Stars: ✭ 3,550 (+941.06%)
Mutual labels:  kubernetes-deployment
k3s-on-prem-production
Playbooks needed to set up an on-premises K3s cluster and securize it
Stars: ✭ 108 (-68.33%)
Mutual labels:  kubernetes-deployment
kuberbs
K8s deployment rollback system based on system observability principles of modern stacks
Stars: ✭ 61 (-82.11%)
Mutual labels:  kubernetes-deployment
Kubekit
A Kubernetes deployment toolkit for offline environment.
Stars: ✭ 328 (-3.81%)
Mutual labels:  kubernetes-deployment
Kubekey
Provides a flexible, rapid and convenient way to install Kubernetes only, both Kubernetes and KubeSphere, and related cloud-native add-ons. It is also an efficient tool to scale and upgrade your cluster.
Stars: ✭ 288 (-15.54%)
Mutual labels:  kubernetes-deployment
k8s-day2-ops
This repository contain scripts for Kubernetes day 2 operations
Stars: ✭ 25 (-92.67%)
Mutual labels:  kubernetes-deployment

Kubernetes and LinuxKit

CircleCI

This project aims to demonstrate how one can create minimal and immutable Kubernetes OS images with LinuxKit.

Build requirements

To build images and to rebuild the individual packages you will need the LinuxKit tool

If you already have go installed you can use go get -u github.com/linuxkit/linuxkit/src/cmd/linuxkit to install the tool.

On MacOS there is a brew tap available. Detailed instructions are at linuxkit/homebrew-linuxkit, the short summary is

brew tap linuxkit/linuxkit
brew install --HEAD linuxkit

Build requirements from source:

  • GNU make
  • Docker
  • optionally qemu

Building OS images

To build the default OS images:

make all

By default this will build images using Docker Engine for execution. To instead use cri-containerd use:

make all KUBE_RUNTIME=cri-containerd

Booting and initialising OS images

Boot Kubernetes master OS image using hyperkit on macOS: or qemu on Linux:

./boot.sh

or, to automatically initialise the cluster upon boot with no additional options

KUBE_MASTER_AUTOINIT="" ./boot.sh

Get IP address of the master:

ip addr show dev eth0

Login to the kubelet container:

./ssh_into_kubelet.sh <master-ip>

Manually initialise master with kubeadm if booted without KUBE_MASTER_AUTOINIT:

kubeadm-init.sh

Once kubeadm exits, make sure to copy the kubeadm join arguments, and try kubectl get nodes from within the master.

If you just want to run a single node cluster with jobs running on the master, you can use:

kubectl taint nodes --all node-role.kubernetes.io/master- --kubeconfig /etc/kubernetes/admin.conf

To boot a node use:

./boot.sh <n> [<join_args> ...]

More specifically, to start 3 nodes use 3 separate shells and run this:

shell1> ./boot.sh 1 --token bb38c6.117e66eabbbce07d 192.168.65.22:6443 --discovery-token-unsafe-skip-ca-verification
shell2> ./boot.sh 2 --token bb38c6.117e66eabbbce07d 192.168.65.22:6443 --discovery-token-unsafe-skip-ca-verification
shell3> ./boot.sh 3 --token bb38c6.117e66eabbbce07d 192.168.65.22:6443 --discovery-token-unsafe-skip-ca-verification

Platform specific information

MacOS

The above instructions should work as is.

Linux

By default linuxkit run uses user mode networking which does not support access from the host. To workaround this you can use port forwarding e.g.

KUBE_RUN_ARGS="-publish 2222:22" ./boot.sh

ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p 2222 [email protected]

However you will not be able to run worker nodes since individual instances cannot see each other.

To enable networking between instance unfortunately requires root privileges to configure a bridge and setup the bridge mode privileged helper.

See http://wiki.qemu.org/Features/HelperNetworking for details in brief you will need:

  • To setup and configure a bridge (including e.g. DHCP etc) on the host. (You can reuse a bridge created by e.g. virt-mananger)

  • To set the qemu-bridge-helper setuid root. The location differs by distro, it could be /usr/lib/qemu/qemu-bridge-helper or /usr/local/libexec/qemu-bridge-helper or elsewhere. You need to chmod u+s «PATH».

  • List the bridge created in the first step in /etc/qemu/bridge.conf with a line like allow br0 (if your bridge is called br0).

  • Set KUBE_NETWORKING=bridge,«name» e.g.

    KUBE_NETWORKING="bridge,br0" ./boot.sh KUBE_NETWORKING="bridge,br0" ./boot.sh 1 «options»

Configuration

The boot.sh script has various configuration variables at the top which can be overridden via the environment e.g.

KUBE_VCPUS=4 ./boot.sh
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].