Skip to content

Commit

Permalink
examples: Update examples to Kubernetes v1.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dghubble committed Oct 13, 2017
1 parent 692bf81 commit 705287b
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Notable changes between releases.

### Examples / Modules

* Upgrade Kubernetes v1.7.7 example clusters
* Upgrade Kubernetes example clusters to v1.8.1
* Kubernetes examples clusters enable etcd TLS
* Deploy the Container Linux Update Operator (CLUO) to coordinate reboots of Container Linux nodes in Kubernetes clusters. See the cluster [addon docs](Documentation/cluster-addons.md).
* Kubernetes examples (terraform and non-terraform) mask locksmithd
Expand Down
12 changes: 7 additions & 5 deletions Documentation/bootkube.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Kubernetes

The Kubernetes example provisions a 3 node Kubernetes v1.7.7 cluster. [bootkube](https://github.com/kubernetes-incubator/bootkube) is run once on a controller node to bootstrap Kubernetes control plane components as pods before exiting. An etcd3 cluster across controllers is used to back Kubernetes.
The Kubernetes example provisions a 3 node Kubernetes v1.8.1 cluster. [bootkube](https://github.com/kubernetes-incubator/bootkube) is run once on a controller node to bootstrap Kubernetes control plane components as pods before exiting. An etcd3 cluster across controllers is used to back Kubernetes.

## Requirements

Expand Down Expand Up @@ -44,12 +44,14 @@ Add your SSH public key to each machine group definition [as shown](../examples/
}
```

Use the `bootkube` tool to render Kubernetes manifests and credentials into an `--asset-dir`. Later, `bootkube` will schedule these manifests during bootstrapping and the credentials will be used to access your cluster.
Use the `bootkube` tool to render Kubernetes manifests and credentials into an `--asset-dir`. Set the `--network-provider` to `flannel` (default) or `experimental-calico` if desired.

```sh
bootkube render --asset-dir=assets --api-servers=https://node1.example.com:443 --api-server-alt-names=DNS=node1.example.com --etcd-servers=https://node1.example.com:2379
```

Later, a controller will use `bootkube` to bootstrap these manifests and the credentials will be used to access your cluster.

## Containers

Use rkt or docker to start `matchbox` and mount the desired example resources. Create a network boot environment and power-on your machines. Revisit [matchbox with rkt](getting-started-rkt.md) or [matchbox with Docker](getting-started-docker.md) for help.
Expand Down Expand Up @@ -106,9 +108,9 @@ $ ssh core@node1.example.com 'journalctl -f -u bootkube'
$ export KUBECONFIG=assets/auth/kubeconfig
$ kubectl get nodes
NAME STATUS AGE VERSION
node1.example.com Ready 11m v1.7.7+coreos.0
node2.example.com Ready 11m v1.7.7+coreos.0
node3.example.com Ready 11m v1.7.7+coreos.0
node1.example.com Ready 11m v1.8.1+coreos.0
node2.example.com Ready 11m v1.8.1+coreos.0
node3.example.com Ready 11m v1.8.1+coreos.0

$ kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
* [matchbox with Docker](Documentation/getting-started-docker.md)
* Clusters
* [etcd3](Documentation/getting-started-rkt.md) - Install a 3-node etcd3 cluster
* [Kubernetes](Documentation/bootkube.md) - Install a 3-node Kubernetes v1.7.7 cluster
* [Kubernetes](Documentation/bootkube.md) - Install a 3-node Kubernetes v1.8.1 cluster
* Clusters (Terraform-based)
* [etcd3](examples/terraform/etcd3-install/README.md) - Install a 3-node etcd3 cluster
* [Kubernetes](examples/terraform/bootkube-install/README.md) - Install a 3-node Kubernetes v1.7.7 cluster
* [Kubernetes](examples/terraform/bootkube-install/README.md) - Install a 3-node Kubernetes v1.8.1 cluster

### Projects

Expand Down
6 changes: 3 additions & 3 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ These examples use [Terraform](https://www.terraform.io/intro/) as a client to M
|-------------------------------|-------------------------------|
| [simple-install](terraform/simple-install) | Install Container Linux with an SSH key |
| [etcd3-install](terraform/etcd3-install) | Install a 3-node etcd3 cluster |
| [bootkube-install](terraform/bootkube-install) | Install a 3-node Kubernetes v1.7.7 cluster |
| [bootkube-install](terraform/bootkube-install) | Install a 3-node Kubernetes v1.8.1 cluster |

### Customization

Expand All @@ -27,8 +27,8 @@ These examples mount raw Matchbox objects into a Matchbox server's `/var/lib/mat
| grub | CoreOS Container Linux via GRUB2 Netboot | stable/1465.7.0 | RAM | NA |
| etcd3 | PXE boot a 3-node etcd3 cluster with proxies | stable/1465.7.0 | RAM | None |
| etcd3-install | Install a 3-node etcd3 cluster to disk | stable/1465.7.0 | Disk | None |
| bootkube | PXE boot a 3-node Kubernetes v1.7.7 cluster | stable/1465.7.0 | Disk | [tutorial](../Documentation/bootkube.md) |
| bootkube-install | Install a 3-node Kubernetes v1.7.7 cluster | stable/1465.7.0 | Disk | [tutorial](../Documentation/bootkube.md) |
| bootkube | PXE boot a 3-node Kubernetes v1.8.1 cluster | stable/1465.7.0 | Disk | [tutorial](../Documentation/bootkube.md) |
| bootkube-install | Install a 3-node Kubernetes v1.8.1 cluster | stable/1465.7.0 | Disk | [tutorial](../Documentation/bootkube.md) |

### Customization

Expand Down
6 changes: 3 additions & 3 deletions examples/ignition/bootkube-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ storage:
contents:
inline: |
KUBELET_IMAGE_URL=quay.io/coreos/hyperkube
KUBELET_IMAGE_TAG=v1.7.7_coreos.0
KUBELET_IMAGE_TAG=v1.8.1_coreos.0
- path: /etc/ssl/etcd/.empty
filesystem: root
mode: 0644
Expand Down Expand Up @@ -156,8 +156,8 @@ storage:
#!/bin/bash
# Wrapper for bootkube start
set -e
BOOTKUBE_ACI="${BOOTKUBE_ACI:-quay.io/coreos/bootkube}"
BOOTKUBE_VERSION="${BOOTKUBE_VERSION:-v0.7.0}"
BOOTKUBE_ACI="${BOOTKUBE_ACI:-quay.io/coreos/bootkube-dev}"
BOOTKUBE_VERSION="${BOOTKUBE_VERSION:-34f3b35c9097a04b9fc43abb56901c9eea764a6e}"
BOOTKUBE_ASSETS="${BOOTKUBE_ASSETS:-/opt/bootkube/assets}"
exec /usr/bin/rkt run \
--trust-keys-from-https \
Expand Down
2 changes: 1 addition & 1 deletion examples/ignition/bootkube-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ storage:
contents:
inline: |
KUBELET_IMAGE_URL=quay.io/coreos/hyperkube
KUBELET_IMAGE_TAG=v1.7.7_coreos.0
KUBELET_IMAGE_TAG=v1.8.1_coreos.0
- path: /etc/ssl/etcd/.empty
filesystem: root
mode: 0644
Expand Down
8 changes: 4 additions & 4 deletions examples/terraform/bootkube-install/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Kubernetes

The Kubernetes example shows how to use Matchbox to network boot and provision a 3 node Kubernetes v1.7.7 cluster. This example uses [Terraform](https://www.terraform.io/intro/index.html) and a module provided by [Typhoon](https://github.com/poseidon/typhoon) to describe cluster resources. [kubernetes-incubator/bootkube](https://github.com/kubernetes-incubator/bootkube) is run once to bootstrap the Kubernetes control plane.
The Kubernetes example shows how to use Matchbox to network boot and provision a 3 node Kubernetes v1.8.1 cluster. This example uses [Terraform](https://www.terraform.io/intro/index.html) and a module provided by [Typhoon](https://github.com/poseidon/typhoon) to describe cluster resources. [kubernetes-incubator/bootkube](https://github.com/kubernetes-incubator/bootkube) is run once to bootstrap the Kubernetes control plane.

## Requirements

Expand Down Expand Up @@ -129,9 +129,9 @@ $ sudo ./scripts/libvirt [start|reboot|shutdown|poweroff|destroy]
$ export KUBECONFIG=assets/auth/kubeconfig
$ kubectl get nodes
NAME STATUS AGE VERSION
node1.example.com Ready 11m v1.7.7+coreos.0
node2.example.com Ready 11m v1.7.7+coreos.0
node3.example.com Ready 11m v1.7.7+coreos.0
node1.example.com Ready 11m v1.8.1+coreos.0
node2.example.com Ready 11m v1.8.1+coreos.0
node3.example.com Ready 11m v1.8.1+coreos.0

$ kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
Expand Down
2 changes: 1 addition & 1 deletion examples/terraform/bootkube-install/cluster.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Kubernetes cluster
module "cluster" {
source = "git::https://github.com/poseidon/typhoon//bare-metal/container-linux/kubernetes?ref=1bc25c103654a497bcc0c2486104426f09ea2456"
source = "git::https://github.com/poseidon/typhoon//bare-metal/container-linux/kubernetes?ref=e690fdd2913474049ae94a84b2f621b4abbb690a"

# install
matchbox_http_endpoint = "${var.matchbox_http_endpoint}"
Expand Down

0 comments on commit 705287b

Please sign in to comment.