GithubHelp home page GithubHelp logo

huawei-cci's Introduction

Huawei CCI

Huawei CCI (Cloud Container Instance) service provides serverless container management, and does not require users to manage the cluster and the server. Only through simple configuration, users can enjoy the agility and high performance of the container. CCI supports stateless workloads (Deployment) and stateful workload (StatefulSet). On the basis of Kubernetes, we have made a series of important enhancements such as secure container, elastic load balancing, elastic scalability, Blue Green Deployment and so on.

Huawei CCI Virtual Kubelet Provider

Huawei CCI virtual kubelet provider configures a CCI project as node in any of your Kubernetes cluster, such as Huawei CCE (Cloud Container Engine). CCE supports native Kubernetes applications and tools as private cluster, allowing you to easily set up a container runtime environment. Pod which is scheduled to the virtual kubelet provider will run in the CCI, that will makes good use of the high performance of CCI. The diagram below illustrates how Huawei CCI virtual kubelet provider works.

diagram

NOTE: The Huawei CCI virtual-kubelet provider is in the early stages of development, and don't use it in a production environment.

Prerequisites

You must install the provider in a Kubernetes cluster and connect to the CCI, and also need create an account for CCI. Once you've created your account, then need to record the aksk, region for the configuration in next step.

Configuration

Before run CCI Virtual Kubelet Provider, you must do as the following steps.

  1. Create a configuration profile. You need to provide the fields you specify like in the example fils.
  2. Copy your AKSK and save them in environment variable:
export APP_KEY="<AppKey>"
export APP_SECRET="<AppSecret>"

Connect to CCI from your cluster via Virtual Kubelet

On the Kubernetes work node, starting a virtual-kubelet process as follows.

virtual-kubelet --provider huawei --provider-config cci.toml

Then run kubectl get nodes in your cluster to validate the provider has been running as a node.

kubectl get nodes
NAME                            STATUS       AGE       
virtual-kubelet                 Ready        5m        
cce-192.168.0.178               Ready        10d       
cce-192.168.0.233               Ready        10d      

If want to stop the virtual kubelet, just stop the virtual kubelet process.

Schedule pod to CCI via Virtual Kubelet

apiVersion: v1
kind: Pod
metadata:
  name: myapp
  labels:
    app: myapp
spec:
  nodeName: virtual-kubelet
  containers:
  - name: nginx
    image: 1and1internet/ubuntu-16-nginx
    imagePullPolicy: IfNotPresent
    ports:
    - containerPort: 8080
  tolerations:
  - key: huawei.com/cci
    effect: NoSchedule

Replace the nodeName to the virtual-kubelet nodename and save the configuration to a file virtual-kubelet-pod.yaml. Then run kubectl create -f virtual-kubelet-pod.yaml to create the pod. Run kubectl get pods -owide to get pods.

kubectl get pods -o wide
NAME                                            READY     STATUS    RESTARTS   AGE       IP             NODE
myapp-7c7877989-vbffm                           1/1       Running   0          39s       172.17.0.3     virtual-kubelet

huawei-cci's People

Contributors

cpuguy83 avatar sargun avatar robbiezhang avatar fisherxu avatar jlegrone avatar mqliang avatar arapulido avatar bketelsen avatar erjadi avatar erikstmartin avatar krisnova avatar pires avatar rbitia avatar ritazh avatar yashdesai93 avatar

Watchers

James Cloos avatar

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.