GithubHelp home page GithubHelp logo

aliyuncontainerservice / serverless-k8s-examples Goto Github PK

View Code? Open in Web Editor NEW
155.0 11.0 71.0 1.38 MB

Examples for Serverless Kubernetes on Alibaba Cloud - https://yq.aliyun.com/articles/591115

Go 98.96% Makefile 0.47% Shell 0.57%

serverless-k8s-examples's Introduction

Serverless Kubernetes Examples

Serverless Kubernetes is part of Container Service for Alibaba Cloud. It enable you to run Kubernetes application without effort for managing servers or clusters. Serverless Kubernetes lets you focus on building your applications instead of managing the infrastructure.

This directory contains a number of examples of how to run real applications with Serverless Kubernetes of Alibaba Cloud

Quick Start

Create the Serverless Kubernetes and copy the cluster config file to ~/.kube/config

cluster

config

Create NAT Gateway (Suggested)

Create NAT Gateway if you want to pull image from internet (e.g. Docker Hub), or your applications want to access internet.

snat

Featured samples

Community

Join the DingTalk Group

dingtalk

serverless-k8s-examples's People

Contributors

cuericlee avatar denverdino avatar feil0n9wan9 avatar fredkan avatar gujingit avatar jdmelo avatar jovizhangwei avatar lyt99 avatar richard2006 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

serverless-k8s-examples's Issues

为什么没有文档中的 alicloud-disk-common 普通云盘类型?

文档中提到有四个自动创建的 StorageClass:

alicloud-disk-common:自动创建普通云盘。
alicloud-disk-efficiency:自动创建高效云盘。
alicloud-disk-ssd:自动创建SSD云盘。
alicloud-disk-available:提供高可用选项,先尝试自动创建高效云盘;如果相应可用区的高效云盘资源售尽,再尝试自动创建SSD云盘,如果该可用区的SSD云盘也售尽,则尝试自动创建普通云盘。

https://help.aliyun.com/document_detail/100457.html?spm=a2c4g.11186623.6.994.af45631a4lUOR6

但是这里创建了 controller 的配置文件中,添加了四个,新添了一个 ESSD,但是没有 common,是现在不能用 common,而只有 essd, ssd, efficiency 三种云盘类型资源了吗?

HTTPS SLB 400 Bad Request

hello,我在试图通过slb https协议访问k8s 内部http应用是遇到400 Bad Request

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: ingress-test
  annotations:
    # use the shared ingress-nginx
    kubernetes.io/ingress.class: "nginx"
spec:
  backend:
    serviceName: test
    servicePort: 80
  rules:
  - host: x.x.x.x
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          serviceName: test

kube-system nginx-ingress-lb LoadBalancer 192.168.173.129 x.x.x.x 80:30369/TCP,443:31110/TCP 2d20h

当将ssl放到ingress,并且修改slb为tcp是工作正常

问题: 已经在slb配置证书,为啥无法工作?

There is an error when I created an OSS volume using example from this repo

Error Information

Pod ubuntu-pod requires volume oss which is of an unsupported type

deployment content

apiVersion: v1
kind: Pod
metadata:
  name: ubuntu-pod
  labels:
    app: ubuntu
spec:
  containers:
  - name: ubuntu
    image:  registry-vpc.cn-shanghai.aliyuncs.com/jovi/ubuntu:latest
    imagePullPolicy: Always
    command: ["sleep", "1000"]
    volumeMounts:
    - name: oss
      mountPath: "/oss"
  volumes:
  - name: "oss"
    flexVolume:
      driver: "alicloud/oss"
      options:
        bucket: "xxx"
        url: "oss-cn-beijing.aliyuncs.com"
        akId: "xxx"
        akSecret: "xxx"
  restartPolicy: Never

PS: my akId and akSecret is created from a sub-account which has OSS full access permission.

最新的alicloud-disk-controller有问题

镜像版本号:v1.14.8.31-c643bb89-aliyun
我用的是Serverless K8s,所以安装了这个版本(PS:这个仓库里的版本没问题),上面这个版本用起来老是显式无法操作XX区域的磁盘。我就记得这些。

安装磁盘控制器后nas-pvc方式挂载失败

部署磁盘控制器后产生了两个Pod

  1. 磁盘控制器pod: alicloud-disk-controller-xxx,正常运行

  2. CSI插件pod: csi-nasplugin-xxx,一直处于pending状态

使用nas-pvc.yaml执行测试时挂载失败, 其他两种方式均可挂载成功. nas-nfsvolume.yaml和nas-flexvolume.yaml

错误日志:

MountVolume.SetUp failed for volume "persistent-storage" : mount failed: exit status 32 Mounting command: systemd-run Mounting arguments: --description=Kubernetes transient mount for /var/lib/kubelet/pods/94f5d109-71d2-4091-8eee-c20abbcd6f09/volumes/kubernetes.ionfs/persistent-storage --scope -- mount -t nfs xxxxxx.cn-chengdu.nas.aliyuncs.com:/nfs/ /var/lib/kubelet/pods/94f5d109-71d2-4091-8eee-c20abbcd6f09/volumes/kubernetes.ionfs/persistent-storage Output: Running scope as unit run-971.scope. mount.nfs: access denied by server while mounting xxxx.cn-chengdu.nas.aliyuncs.com:/nfs/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.