k8s 中文文档 k8s 中文文档
指南
kubernetes.io (opens new window)
指南
kubernetes.io (opens new window)
  • k8s 是什么
  • 互动教程

  • Minikube 介绍

  • 概念

  • Kubectl CLI

  • Kubectl 命令表

  • 安装设置

  • API 使用

  • 集群管理

  • TASKS

Sealer -- Build, Share and Run Any Distributed Applications


Go Release

Contents


Introduction
Quick Start
Contributing
FAQ
Adopters
LICENSE
Code of conduct

Introduction


Sealer[ˈsiːlər] provides a new way of distributed application delivery which is reducing the difficulty and complexity by packaging Kubernetes cluster and all application's dependencies into one ClusterImage.

We can write a Kubefile to build the ClusterImage, and use it to deliver your applications with embedded Kubernetes through Clusterfile.

Concept


Kubefile: a file that describes how to build a ClusterImage.
ClusterImage: like docker image, and it contains all the dependencies(container images,yaml files or helm chart...) of your application needed.
Clusterfile: a file that describes how to run a ClusterImage.

Awesome features


Simplicity: Packing the distributed application into ClusterImage with few instructions.
Efficiency: Launching the k8s-based application through ClusterImage in minutes.
Scalability: Powerful cluster and image life cycle management, such as cluster scale, upgrade, image load, save and so on.
Compatibility: Multi-arch delivery Supporting. Such as AMD, ARM with common Linux distributions.
Iterative: Incremental operations on ClusterImage is like what container image behaves.

Quick start


Download sealer binary file.

  1. ``` shell
  2. #install Sealer binaries
  3. wget https://github.com/sealerio/sealer/releases/download/v0.9.0/sealer-v0.9.0-linux-amd64.tar.gz && \
  4. tar zxvf sealer-v0.9.0-linux-amd64.tar.gz && mv sealer /usr/bin
  5. ```

Install a kubernetes cluster


  1. ``` shell
  2. # run a kubernetes cluster
  3. sealer run docker.io/sealerio/kubernetes:v1.22.15 \
  4.   --masters 192.168.0.2,192.168.0.3,192.168.0.4 \
  5.   --nodes 192.168.0.5,192.168.0.6,192.168.0.7 --passwd xxx
  6. ```

Build an sealer image


Kubefile:

  1. ``` shell
  2. FROM docker.io/sealerio/kubernetes:v1.22.15
  3. APP mysql https://charts/mysql.tgz
  4. APP elasticsearch https://charts/elasticsearch.tgz
  5. APP redis local://redis.yaml
  6. APP businessApp local://install.sh
  7. LAUNCH ["calico", "mysql", "elasticsearch", "redis", "businessApp"]
  8. ```

or

  1. ``` shell
  2. FROM docker.io/sealerio/kubernetes:v1.22.15
  3. COPY mysql.tgz .
  4. COPY elasticsearch.tgz .
  5. COPY redis.yaml .
  6. COPY install.sh .
  7. CMDS ["sh application/apps/calico/calico.sh", "helm install mysql.tgz", "helm install elasticsearch.tgz", "kubectl apply -f redis.yaml", "bash install.sh"]
  8. ```

build command:

NOTE: --type=kube-installer is the default value for sealer build


  1. ``` shell
  2. sealer build -f Kubefile -t my-kubernetes:1.0.0 .
  3. ```

Build an app image


nginx.yaml:

  1. ``` shell
  2. apiVersion: apps/v1
  3. kind: Deployment
  4. metadata:
  5.   name: my-nginx
  6.   namespace: default
  7. spec:
  8.   replicas: 1
  9.   selector:
  10.     matchLabels:
  11.       run: my-nginx
  12.   template:
  13.     metadata:
  14.       labels:
  15.         run: my-nginx
  16.     spec:
  17.       containers:
  18.         - name: my-nginx
  19.           image: nginx
  20.           ports:
  21.             - containerPort: 80
  22. ```

Kubefile:

  1. ``` shell
  2. FROM scratch
  3. APP nginx local://nginx.yaml
  4. LAUNCH ["nginx"]
  5. ```

  1. ``` shell
  2. sealer build -f Kubefile -t sealer-io/nginx:latest --type app-installer
  3. ```

Run the app image


  1. ``` shell
  2. sealer run sealer-io/nginx:latest
  3. # check the pod
  4. kubectl get pod -A
  5. ```

Push the app image to the registry


  1. ``` shell
  2. # you can push the app image to docker hub, Ali ACR, or Harbor
  3. sealer tag sealer-io/nginx:latest {registryDomain}/sealer-io/nginx:latest
  4. sealer push {registryDomain}/sealer-io/nginx:latest
  5. ```

Clean the cluster


Some information of the basic settings will be written to the Clusterfile and stored in /root/.sealer/Clusterfile.

  1. ``` shell
  2. sealer delete -a
  3. ```

User guide


Sealer provides a valid image list:

version image Arch OS Network plugins container runtime
:--- :--- :--- :--- :--- :---
v0.8.6 registry.cn-qingdao.aliyuncs.com/sealer-io/kubernetes:v1.22.15-0.8.6 x86 CentOS/RHEL 7.5CentOS/RHEL 7.6CentOS/RHEL 7.7CentOS/RHEL 7.8CentOS/RHEL 7.9 calico hack docker v19.03.14
v0.9.0 docker.io/sealerio/kubernetes:v1.18.3 x86 CentOS/RHEL 7.5CentOS/RHEL 7.6CentOS/RHEL 7.7CentOS/RHEL 7.8CentOS/RHEL 7.9 calico Official docker v19.03.15
v0.9.0 docker.io/sealerio/kubernetes:v1.20.4 x86 CentOS/RHEL 7.5CentOS/RHEL 7.6CentOS/RHEL 7.7CentOS/RHEL 7.8CentOS/RHEL 7.9 calico Official docker v19.03.15
v0.9.0 docker.io/sealerio/kubernetes:v1.22.15 x86 CentOS/RHEL 7.5CentOS/RHEL 7.6CentOS/RHEL 7.7CentOS/RHEL 7.8CentOS/RHEL 7.9 calico Official docker v19.03.15
v0.9.0 docker.io/sealerio/kubernetes:v1-22-15-sealerio-1 x86 CentOS/RHEL 7.5CentOS/RHEL 7.6CentOS/RHEL 7.7CentOS/RHEL 7.8CentOS/RHEL 7.9 calico hack docker v19.03.14
v0.9.0 docker.io/sealerio/kubernetes-arm64:v1.18.3 arm64 CentOS/RHEL 7.5CentOS/RHEL 7.6CentOS/RHEL 7.7CentOS/RHEL 7.8CentOS/RHEL 7.9 calico Official docker v19.03.15
v0.9.0 docker.io/sealerio/kubernetes-arm64:v1.20.4 arm64 CentOS/RHEL 7.5CentOS/RHEL 7.6CentOS/RHEL 7.7CentOS/RHEL 7.8CentOS/RHEL 7.9 calico Official docker v19.03.15
v0.9.0 docker.io/sealerio/kubernetes-arm64:v1.22.15 arm64 CentOS/RHEL 7.5CentOS/RHEL 7.6CentOS/RHEL 7.7CentOS/RHEL 7.8CentOS/RHEL 7.9 calico Official docker v19.03.15
v0.9.0 docker.io/sealerio/kubernetes-arm64:v1-22-15-sealerio-1 arm64 CentOS/RHEL 7.5CentOS/RHEL 7.6CentOS/RHEL 7.7CentOS/RHEL 7.8CentOS/RHEL 7.9 calico hack docker v19.03.14

get started

Official website


official website

Developing Sealer


contributing guide

Communication Channels


CNCF Mailing List: to be added.
Twitter: @sealer
DingTalk Group Number: 34619594

Code of Conduct


sealer follows the CNCF Code of Conduct.

License


Sealer is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.
Last Updated: 2023-09-03 19:17:54