• This repository has been archived on 10/Feb/2022
  • Stars
    star
    160
  • Rank 234,703 (Top 5 %)
  • Language
    Ruby
  • License
    Apache License 2.0
  • Created about 8 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Kubernetes BOSH release

Cloud Foundry Container Runtime

A BOSH release for Kubernetes. Formerly named kubo.

Table of Contents

Prerequisites

  • A BOSH Director configured with UAA, Credhub, and BOSH DNS runtime config. We recommend using BOSH Bootloader for this.

  • Latest kubo-deployment tarball

  • Accessing the master:

    • Single Master: Set up a DNS name pointing to your master's IP address
    • Multiple Masters: A TCP load balancer for your master nodes.
      • Use a TCP load balancer configured to connect to the master nodes on port 8443.
      • Add healthchecks using either a TCP dial or HTTPS by looking for a 200 OK response from /healthz.
      • if you have used BOSH Bootloader on GCP then you need to manually create a firewall rule. Allow access to port TCP 8443 to VMs in your BBL network tagged cfcr-master from your load balancer's IP.
  • Cloud Config with

    • vm_types named minimal, small, and small-highmem (See cf-deployment for reference)
    • network named default
    • three availability zones azs named z1,z2,z3

    Note: the cloud-config properties can be customized by applying ops-files. See manifests/ops-files for some examples.

    If using loadbalancers then apply the vm_extension called cfcr-master-loadbalancer to the cloud-config to add the instances to your loadbalancers. See BOSH documentation for information on how to configure loadbalancers.

Hardware Requirements

Kubernetes uses etcd as its datastore. The official infrastructure requirements and example configurations for the etcd cluster can be found here.

Deploying CFCR

  1. Upload the latest Xenial stemcell to the director.

  2. Untar the kubo-deployment tarball and rename it kubo-deployment

  3. Deploy

    Option 1. Single Master
    cd kubo-deployment
    
    bosh deploy -d cfcr manifests/cfcr.yml \
      -o manifests/ops-files/misc/single-master.yml \
      -o manifests/ops-files/add-hostname-to-master-certificate.yml \
      -v api-hostname=[DNS-NAME]
    Option 2. Three Masters
    cd kubo-deployment
    
    bosh deploy -d cfcr manifests/cfcr.yml \
      -o manifests/ops-files/add-vm-extensions-to-master.yml \
      -o manifests/ops-files/add-hostname-to-master-certificate.yml \
      -v api-hostname=[LOADBALANCER-ADDRESS]

    Note: Loadbalancer address should be the external address (hostname or IP) of the loadbalancer you have configured.

    Check additional configurations, such as setting Kubernetes cloud provider, in docs.

  4. Add Kubernetes system components

    bosh -d cfcr run-errand apply-specs
  5. Run the following to confirm the cluster is operational

    bosh -d cfcr run-errand smoke-tests

Configuring CFCR

Please check out our manifest and ops-files in kube-deployment for examples on how to configure kubo-release. Additionally, we have a doc page to describe how to configure Kubernetes components for the release.

CFCR can be deployed with Pod Security Policies. Check for more details in the doc

Configuring Proxy for CFCR

CFCR allows you to configure proxy for all components. Check recommendations for no proxy settings first.

BOSH Lite

CFCR clusters on BOSH Lite are intended for development. We run the deploy_cfcr_lite script to provision a cluster with the latest stemcell and master of kubo-release. This requires that the cloned kubo-release repository can be found from cd ../kubo-release from within the kubo-deployment directory.

cd kubo-deployment
./bin/deploy_cfcr_lite

Accessing the CFCR Cluster with kubectl

  1. Login to the Credhub Server that stores the cluster's credentials:
    credhub login
    
  2. Find the director name by running
    bosh env
    
  3. Configure the kubeconfig for your kubectl client:
    cd kubo-deployment
    
    ./bin/set_kubeconfig <DIRECTOR_NAME>/cfcr https://[DNS-NAME-OR-LOADBALANCER-ADDRESS]:8443
    

Backup & Restore

We use BBR to perform backups and restores of the etcd node within a CFCR cluster, for both single and three master deployments. Our backup currently takes an etcd snapshot without interruptions to the cluster. However, for restore we take both the kube-apiserver and etcd offline to restore the cluster with the specified snapshot. Restore is a destructive operation that will completely overwrite any existing data on the cluster. For a closer look at the bbr scripts, check out:

To run the bbr cli against a CFCR cluster, follow the steps under "BOSH Deployment" on the BBR documentation page.

Monitoring

Follow the recommendations in etcd's documentation for monitoring etcd metrics.

DNS

By default CFCR runs with CoreDNS in preference of Kube-DNS.

If you are migrating from an earlier version of CFCR, Kube-DNS can be removed by running:

kubectl delete deployment -n kube-system kube-dns

You may notice that a kube-dns service remains, this is also required by the CoreDNS spec.

Deprecations

Deployment scripts and docs

CFCR had a set of scripts, including deploy_bosh and deploy_k8s, that were the primary mechanism we supported to deploy BOSH and Kubernetes clusters. We no longer support these and have removed the corresponding documentation from https://docs-cfcr.cfapps.io

The BOSH oriented method documented in this README.md is the supported method to deploy Kubernetes clusters with CFCR.

Heapster

K8s 1.11 release kicked off the deprecation timeline for the Heapster component, see here for more info. As a result, we're in the process of replacing Heapster with Metrics Server in the upcoming releases of kubo-release.

Heapster can be removed by running:

kubectl delete deployment -n kube-system heapster

More Repositories

1

kubo-deployment

Contains manifests used to deploy Cloud Foundry Container Runtime
Shell
275
star
2

cflocal

Stage and launch CF apps, push and pull droplets, and connect to real CF services -- in Docker
Go
178
star
3

docker-boshrelease

Docker BOSH Release
Shell
137
star
4

kubecf

Cloud Foundry on Kubernetes
Shell
115
star
5

admin-ui

Need new main contributor - An application for viewing Cloud Foundry metrics and operations data.
Ruby
71
star
6

fissile

Turn a BOSH release into container images / files
Go
67
star
7

spiff

declarative BOSH deployment manifest builder
Go
63
star
8

quarks-operator

BOSH releases deployed on Kubernetes
Go
49
star
9

bosh-alicloud-cpi-release

BOSH release for the BOSH Alibaba Cloud CPI.
Go
32
star
10

kubo-ci

Go
30
star
11

pat

Go
16
star
12

bits-service

Cloud Foundry Bits-Service repository
JavaScript
15
star
13

bosh-rackhd-cpi-release

BOSH RackHD CPI
Go
14
star
14

uaa-java-client

Java Client for Cloud Foundry UAA 2.x
Java
13
star
15

kubernetes-guidelines

Guidelines for developing applications running on top of Kubernetes
11
star
16

core-values-faq

11
star
17

NET-sample-app

A .NET sample app
ASP
10
star
18

uaago

UAA client for golang
Go
7
star
19

quarks-secret

Generate k8s secrets with an operator
Go
7
star
20

cf-plugin-backup

A Cloud Foundry Plugin that allows backup and restore of the CCDB using CF API
Go
7
star
21

asg-creator

Go
6
star
22

bits-service-release

BOSH release for Cloud Foundry Bits-Service
Ruby
5
star
23

bits-service-ci

Bits-Service CI Code
Shell
4
star
24

cf-extensions

CF-extensions hub project
Go
4
star
25

example-nozzle-release

BOSH release for the example-nozzle
Shell
4
star
26

quarks-job

Wrapper around k8s jobs that can store output and more
Go
4
star
27

uaa-go-client

UAA Client for Go!
Go
3
star
28

configgin

CLI app to generate configurations using BOSH ERB templates
Ruby
3
star
29

eirini-persi

Persi support for Eirini, using eirinix
Go
3
star
30

cf-prometheus-operator

Go
3
star
31

kubernetes-release

Shell
2
star
32

cfcr-home

Shell
2
star
33

backup-and-restore-ci

Platform Recovery CI
Shell
2
star
34

cfcr-etcd-release

Shell
2
star
35

eirini-loggregator-bridge

Component that streams logs from Eirini apps to the Cloud Foundry Loggregator
Go
2
star
36

go-stream-aggregator

Go
2
star
37

eirini-ssh

Support for "ssh to app" for Cloud Foundry Eirini
Go
2
star
38

bosh-oracle-cpi-release

Go
2
star
39

garden-windows-bosh-release

PowerShell
2
star
40

eirinix

Extensions Library for Cloud Foundry Eirini
Go
2
star
41

thoth

An App responsible for measuring and controlling time
Go
2
star
42

bosh-huaweicloud-cpi-release

Ruby
2
star
43

quarks-gora-release

HTML
1
star
44

cf-telegraf-operator

Go
1
star
45

quarks-gora

Go
1
star
46

quarks-helm

1
star
47

eirinix-sample

Sample extension for Eirini, created with the eirinix framework
Go
1
star
48

quarks-ci

Shell
1
star
49

example-nozzle

Example loggregator firehose nozzle
Go
1
star
50

log-cache-tools

Go
1
star
51

grpc-throughputlb

Go
1
star
52

eirinix-helm-release

Ruby
1
star
53

kubo-disaster-recovery-acceptance-tests

Go
1
star
54

buildpacks-site

JavaScript
1
star
55

eirini-staging

Go
1
star
56

quarks-docs

The shared documentation for Quarks
HTML
1
star
57

bits-service-client

Ruby client for the bits-service
Ruby
1
star
58

quarks-statefulset

Wrapper around k8s statefulset with various features
Go
1
star
59

quarks-container-run

Go
1
star
60

concourse-cve-scan

Shell
1
star
61

kubecf-tools

A set of tools for building, testing and releasing projects that are deployed on Kubernetes
Ruby
1
star
62

eirini-helm-release

1
star
63

push-apps

A jar to aide in CI or Bosh jobs that have to push many applications to CF
Kotlin
1
star
64

eirini-persi-broker

Service Broker for provisioning volumes for Eirini on Kubernetes
Go
1
star
65

quarks-utils

Shared utilities for Quarks-* operators
Go
1
star
66

eirini-logging

App logging extension
Go
1
star