You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/11/06 05:53:00 UTC

[GitHub] daisy-ycguo commented on a change in pull request #335: reorganize docs describing Kubernetes options and mycluster.yaml

daisy-ycguo commented on a change in pull request #335: reorganize docs describing Kubernetes options and mycluster.yaml
URL: https://github.com/apache/incubator-openwhisk-deploy-kube/pull/335#discussion_r231003851
 
 

 ##########
 File path: README.md
 ##########
 @@ -23,109 +23,76 @@
 [![Build Status](https://travis-ci.org/apache/incubator-openwhisk-deploy-kube.svg?branch=master)](https://travis-ci.org/apache/incubator-openwhisk-deploy-kube)
 [![Join Slack](https://img.shields.io/badge/join-slack-9B69A0.svg)](http://slack.openwhisk.org/)
 
-This repository can be used to deploy OpenWhisk to a Kubernetes cluster.
+This repository can be used to deploy OpenWhisk to Kubernetes.
+It contains Helm charts, documentation, and supporting
+configuration files and scripts that can be used to deploy OpenWhisk
+to both single-node and multi-node Kubernetes clusters.
 
 # Table of Contents
 
-* [Setting up Kubernetes and Helm](#setting-up-kubernetes-and-helm)
+* [Prerequisites: Kubernetes and Helm](#prerequisites-kubernetes-and-helm)
 * [Deploying OpenWhisk](#deploying-openwhisk)
 * [Deploying OpenWhisk Providers](#deploying-openwhisk-providers)
 * [Development and Testing](#development-and-testing)
 * [Cleanup](#cleanup)
 * [Issues](#issues)
 
-# Setting up Kubernetes and Helm
+# Prerequisites: Kubernetes and Helm
 
-## Kubernetes
-
-### Requirements
-
-Several requirements must be met for OpenWhisk to deploy on Kubernetes.
-* [Kubernetes](https://github.com/kubernetes/kubernetes) version 1.9+. However, version 1.9.4 will not work for OpenWhisk due to a bug with volume mount subpaths (see[[kubernetes-61076](https://github.com/kubernetes/kubernetes/issues/61076)]). This bug will surface as a failure when deploying the nginx container.
-* The ability to create Ingresses to make a Kubernetes service available outside of the cluster so you can actually use OpenWhisk.
-* If you enable persistence (see [docs/configurationChoices.md](./docs/configurationChoices.md)), either your cluster is configured to support [Dynamic Volume Provision](https://kubernetes.io/docs/concepts/storage/dynamic-provisioning/) or you must manually create any necessary PersistentVolumes when deploying the Helm chart.
-* Endpoints of Kubernetes services must be able to loopback to themselves (the kubelet's `hairpin-mode` must not be `none`).
-
-### Using Kubernetes in Docker for Mac
-
-If you are using a Mac as your development machine, the simplest way
-to get a Kubernetes cluster for local development is to use the
-built-in support for running a single node Kubernetes cluster that is
-available in Docker 18.06 and later.  This will let you use Helm to
-deploy Apache OpenWhisk to Kubernetes on your laptop without needing
-to install Minikube or otherwise run inside a virtual machine.
-
-Step-by-step instructions on enabling Kubernetes in Docker are
-available as part of the
-[Getting started](https://docs.docker.com/docker-for-mac/#kubernetes)
-documentation from Docker.
-
-In a nutshell, open the Docker preferences window, switch to the
-`Advanced` panel and make sure you have at least 4GB of Memory
-allocated to Docker. Then switch to the Kubernetes panel, and check
-the box to enable Kubernetes. It is recommended that you use the
-`kubectl` cli that is installed by Docker in `/usr/local/bin`, so
-please make sure it is appears in your path before any `kubectl` you
-might also have installed on your machine.  Finally, pick the
-`docker-for-desktop` config for `kubectl` by executing the command
-`kubectl config use-context docker-for-desktop`.
-
-One nice feature of using Kubernetes in Docker, is that the
-containers being run in Kubernetes are also directly
-visible/accessible via the usual Docker commands. Furthermore, it is
-straightforward to deploy local images by adding a stanza to your
-mycluster.yaml. For example, to use a locally built controller image,
-just add the stanza below to your `mycluster.yaml` to override the default
-behavior of pulling `openwhisk/controller:latest` from Docker Hub.
-```yaml
-controller:
-  image: "whisk/controller"
-  imagePullPolicy: "IfNotPresent"
-```
-
-NOTE: Docker for Windows 18.06 and later has similar built-in support
-for Kubernetes. We would be interested in any experience using it to
-run Apache OpenWhisk on the Windows platform.
+[Kubernetes](https://kubernetes.io/) is a container orchestration
+platform that automates the deployment, scaling, and management of
+containerized applications. [Helm](https://helm.sh/) is a package
+manager for Kubernetes that simplifies the management of Kubernetes
+applications. You do not need to be an expert on either Kubernetes or
+Helm to use this project, but you may find it useful to review their
+overview documentation at the links above to become familiar with
+their key concepts and terminology.
 
-### Using kubeadm-dind-cluster
-On Linux, you can get a similar experience to using Kubernetes in
-Docker for Mac via the
-[kubeadm-dind-cluster](https://github.com/kubernetes-sigs/kubeadm-dind-cluster)
-project.  In a nutshell, you can get started by doing
-```shell
-# Get the script for the Kubernetes version you want
-wget https://cdn.rawgit.com/kubernetes-sigs/kubeadm-dind-cluster/master/fixed/dind-cluster-v1.10.sh
-chmod +x dind-cluster-v1.10.sh
-
-# start the cluster. Please note you *must* set `USE_HAIRPIN` to `true`
-USE_HAIRPIN=true ./dind-cluster-v1.10.sh up
-
-# add kubectl directory to your PATH
-export PATH="$HOME/.kubeadm-dind-cluster:$PATH"
-```
+## Kubernetes
 
-Our TravisCI testing uses kubeadm-dind-cluster.sh on an ubuntu 16.04
-host.  The `fixed` `dind-cluster` scripts for Kubernetes version 1.10
-and 1.11 are known to work for deploying OpenWhisk.
+Your first step is to create a Kubernetes cluster that is capable of
+supporting an OpenWhisk deployment. Although there are some [technical
+requirements](docs/k8s-technical-requirements.md) that the Kubernetes
+cluster must satisfy, any of the options described below is
+acceptable.
+
+### Simple Docker-based options
+
+The simplest way to get a small Kubernetes cluster suitable for
+development and testing is to use one of the Docker-in-Docker
+approaches for running Kubernetes directly on top of Docker on your
+development machine. Depending on your host operating system, we
+recommend the following:
+1. MacOS: Use the built-in Kubernetes support in Docker for Mac
+version 18.06 or later. Please follow our
+[setup instructions](docs/k8s-docker-for-mac.md) to initially create
+your cluster.
+2. Linux: Use kubeadm-dind-cluster, but carefully follow our our
 
 Review comment:
   type `our our`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services