From 3f37dba17ac74b8ab6cfc04390138e768989efc6 Mon Sep 17 00:00:00 2001 From: Jesse Haka Date: Thu, 31 Jan 2019 20:45:46 +0200 Subject: [PATCH] update openstack documentation --- docs/tutorial/openstack.md | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/docs/tutorial/openstack.md b/docs/tutorial/openstack.md index d72f0edcf5..20b6e3bbd5 100644 --- a/docs/tutorial/openstack.md +++ b/docs/tutorial/openstack.md @@ -3,13 +3,16 @@ **WARNING**: OpenStack support on kops is currently **alpha** meaning it is in the early stages of development and subject to change, please use with caution. ## Source your openstack RC -The Cloud Config used by the kubernetes API server and kubelet will be constructed from environment variables in the openstack RC file. +The Cloud Config used by the kubernetes API server and kubelet will be constructed from environment variables in the openstack RC file. The openrc.sh file is usually located under `API access`. + ```bash source openstack.rc ``` + **--OR--** ## Create config file The config file contains the OpenStack credentials required to create a cluster. The config file has the following format: + ```ini [Default] identity= @@ -38,6 +41,7 @@ region= ## Environment Variables It is important to set the following environment variables: + ```bash export OPENSTACK_CREDENTIAL_FILE= # where is the path of the config file export KOPS_STATE_STORE=swift:// # where is the name of the Swift container to use for kops state @@ -46,6 +50,8 @@ export KOPS_STATE_STORE=swift:// # where is the name export KOPS_FEATURE_FLAGS="AlphaAllowOpenStack" ``` +If your OpenStack does not have Swift you can use any other VFS store, such as S3. + ## Creating a Cluster ```bash @@ -56,31 +62,28 @@ openstack volume type list kops create cluster \ --cloud openstack \ --name my-cluster.k8s.local \ - --state swift://my-cluster \ + --state ${KOPS_STATE_STORE} \ --zones nova \ --network-cidr 10.0.0.0/24 \ - --image CentOS \ + --image \ --master-count=3 \ --node-count=1 \ - --node-size 2vCPUx8GB \ - --master-size 2vCPUx8GB \ - --etcd-storage-type CBS \ - --api-loadbalancer-type public \ + --node-size \ + --master-size \ + --etcd-storage-type \ + --api-loadbalancer-type public \ --topology private \ --bastion \ --ssh-public-key ~/.ssh/id_rsa.pub \ - --networking weave + --networking weave \ + --os-ext-net # to update a cluster -kops update cluster my-cluster.k8s.local --state swift://my-cluster --yes +kops update cluster my-cluster.k8s.local --state ${KOPS_STATE_STORE} --yes # to delete a cluster -# Not implemented yet... -# kops delete cluster my-cluster.k8s.local --yes +kops delete cluster my-cluster.k8s.local --yes ``` -## Features Still in Development - -kops for OpenStack currently does not support these features: -* cluster delete - +#### Optional flags +* `--os-kubelet-ignore-az=true` Nova and Cinder have different availability zones, more information [Kubernetes docs](https://kubernetes.io/docs/concepts/cluster-administration/cloud-providers/#block-storage)