kaph-controller-manager

command module
v0.0.0-...-3fb6cc7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

README

kaph-controller-manager

kaph-controller-manager is a component of Kaph, which is IaaS-type private cloud service based on Kubernetes infrastructure. It is a set of controllers, which controls Kaph's resources by Reconciliation Loop.

 

Kaph's Architecture

 

Support

  • linux/amd64
  • linux/arm64

 

Prerequisites

At first, you need to prepare your Kubernetes cluster for using Kaph.

And also, you also need to prepare an environment where you can execute kubectl commands.

Kaph use Kubebuilder for project template. Therefore, it need to use Kustomize to create some manifests. Please install Kustomize, following this Installation instructions link.

ElasticVirtualMachine, which is Kaph's Custom Resource Definition, will use LoadBalancer type Service resource. So please prepare LoadBalancer type Service resource using MetalLB etc.

 

Installation

To deploy Namespace, CRD, RBAC, Service and Deployment regarding kaph-controller-manager in your Kubernetes cluster

git clone https://github.com/sosomasox/kaph-controller-manager.git
cd kaph-controller-manager
make deploy

 

After deploying, you will get the following results:

$ kubectl -n kaph-system get all 
NAME                                           READY   STATUS    RESTARTS   AGE
pod/kaph-controller-manager-7f7d64cc7f-6592j   2/2     Running   0          45s

NAME                                              TYPE        CLUSTER-IP    EXTERNAL-IP   PORT(S)    AGE
service/kaph-controller-manager-metrics-service   ClusterIP   10.97.4.225   <none>        8443/TCP   45s

NAME                                      READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/kaph-controller-manager   1/1     1            1           45s

NAME                                                 DESIRED   CURRENT   READY   AGE
replicaset.apps/kaph-controller-manager-7f7d64cc7f   1         1         1       45s

 

Demo

For the demo, prepared the following sample:

$ cat config/samples/evms_v1alpha1_elasticvirtualmachine.yaml
---
apiVersion: evms.kaph.io/v1alpha1
kind: ElasticVirtualMachine
metadata:
  name: elasticvirtualmachine-sample
  namespace: kaph-system
spec:
  image: sosomasox/kaph-ubuntu:20.10
  hostname: kaph
  cpu: 1000m
  memory: 1024Mi
  #ip: 172.29.156.190
---

 

To deploy a sample by excuting following command:

kubectl apply -f config/samples/evms_v1alpha1_elasticvirtualmachine.yaml

 

After deploying, you will get the following results:

$ kubectl -n kaph-system get evm,all
NAME                                                              IMAGE                         CPU     MEMORY   HOSTNAME   IP
elasticvirtualmachine.evms.kaph.io/elasticvirtualmachine-sample   sosomasox/kaph-ubuntu:20.10   1000m   1024Mi   kaph       172.29.156.110

NAME                                                READY   STATUS    RESTARTS   AGE
pod/elasticvirtualmachine-sample-7888cb666d-4s7jt   1/1     Running   0          69s
pod/kaph-controller-manager-7f7d64cc7f-6592j        2/2     Running   0          2m12s

NAME                                              TYPE           CLUSTER-IP     EXTERNAL-IP      PORT(S)        AGE
service/elasticvirtualmachine-sample-svc-lb       LoadBalancer   10.98.175.96   172.29.156.110   22:31929/TCP   68s
service/kaph-controller-manager-metrics-service   ClusterIP      10.97.4.225    <none>           8443/TCP       2m12s

NAME                                           READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/elasticvirtualmachine-sample   1/1     1            1           69s
deployment.apps/kaph-controller-manager        1/1     1            1           2m12s

NAME                                                      DESIRED   CURRENT   READY   AGE
replicaset.apps/elasticvirtualmachine-sample-7888cb666d   1         1         1       69s
replicaset.apps/kaph-controller-manager-7f7d64cc7f        1         1         1       2m12s

 

You can do ssh login to a created Pod by ElasticVirtualMachine

Demo

 

If you want to finish demo and uninstall kaph-controller-manager, you should execute following command:

# to finish demo
kubectl delete -f config/samples/evms_v1alpha1_elasticvirtualmachine.yaml
# to uninstall kaph-controller-manager
make withdraw

 

Project Status

  • create project template with Kubebuilder
  • create Makefile for developing and deploying kaph-controller-manager
  • create Dockerfile for developing and deploying kaph-controller-manager as a container
  • create Kaph's Custom Resource Definition
    • create ElasticVirtualMachine(EVM)
    • create ContainerExecutionMachine(CEM)
    • create VirtualPrivateCloud(VPC)
    • create VirtualStorageDevice(VSD)
    • create VirtualLoadBalancer(VLB)
  • create kaph-controller-manager, which will manage Kaph controllers
    • create elasticvirtualmachine-controller(evm-controller)
    • create containerexecutionmachine-controller(sem-controller)
    • create virtualprivatecloud-controller(vpc-controller)
    • create virtualstoragedevice-controller(vsd-controller)
    • create virtualloadbalancer-controller(vlb-controller)

 

License

kaph-controller-manager is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
apis
evms/v1alpha1
Package v1alpha1 contains API Schema definitions for the evms v1alpha1 API group +kubebuilder:object:generate=true +groupName=evms.kaph.io
Package v1alpha1 contains API Schema definitions for the evms v1alpha1 API group +kubebuilder:object:generate=true +groupName=evms.kaph.io
controllers
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL