/nifcloud-cloud-controller-manager

Kubernetes Cloud Controller Manager for NIFCLOUD (beta)

Primary LanguageGoApache License 2.0Apache-2.0

nifcloud-cloud-controller-manager

nifcloud-cloud-controller-manager is the Kubernetes Cloud Controller Manager (CCM) implementation for NIFCLOUD.

Features

  • Node Controller
  • Node Lifecycle Controller
  • Service Controller

Requirements

Installation

Using helm

  1. Create Secret resource with an NIFCLOUD access key id and secret access key.
    apiVersion: v1
    kind: Secret
    metadata:
      name: nifcloud-cloud-controller-manager-secret
      namespace: kube-system
    stringData:
      access_key_id: ""
      secret_access_key: ""
  2. Add helm repository.
    helm repo add nifcloud-cloud-controller-manager https://nifcloud.github.io/nifcloud-cloud-controller-manager
    helm repo update
  3. Install. (Please change the parameter <REGION> to your environment.)
    helm upgrade --install nifcloud-cloud-controller-manager nifcloud-cloud-controller-manager/nifcloud-cloud-controller-manager \
      --namespace kube-system \
      --set nifcloud.region=<REGION> \
      --set nifcloud.accessKeyId.secretName=nifcloud-cloud-controller-manager-secret \
      --set nifcloud.accessKeyId.key=access_key_id \
      --set nifcloud.secretAccessKey.secretName=nifcloud-cloud-controller-manager-secret \
      --set nifcloud.secretAccessKey.key=secret_access_key

Example

LoadBalancer

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx
  labels:
    app: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
        - name: nginx
          image: nginx:alpine
          ports:
            - containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
  name: nginx
  labels:
    app: nginx
spec:
  type: LoadBalancer
  ports:
    - port: 80
      protocol: TCP
      targetPort: 80
  selector:
    app: nginx