mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-12 12:48:51 +00:00
Guide style update
- Don't indent top-level lists - Use 2 space list item indentation, unless using multi-line items, then use 4 space indents - Use underline for page title - Auto-generate table of contents - Start with lvl 2 headers (lvl 1 headers look too much like the page title)
This commit is contained in:
@@ -30,18 +30,22 @@ Documentation for other releases can be found at
|
||||
<!-- END STRIP_FOR_RELEASE -->
|
||||
|
||||
<!-- END MUNGE: UNVERSIONED_WARNING -->
|
||||
|
||||
Getting started with Kubernetes on DCOS
|
||||
----------------------------------------
|
||||
|
||||
This guide will walk you through installing [Kubernetes-Mesos](https://github.com/mesosphere/kubernetes-mesos) on [Datacenter Operating System (DCOS)](https://mesosphere.com/product/) with the [DCOS CLI](https://github.com/mesosphere/dcos-cli) and operating Kubernetes with the [DCOS Kubectl plugin](https://github.com/mesosphere/dcos-kubectl).
|
||||
|
||||
**Table of Contents**
|
||||
<!-- BEGIN MUNGE: GENERATED_TOC -->
|
||||
|
||||
- [About Kubernetes on DCOS](#about-kubernetes-on-dcos)
|
||||
- [Resources](#resources)
|
||||
- [Prerequisites](#prerequisites)
|
||||
- [Install](#install)
|
||||
- [Uninstall](#uninstall)
|
||||
- [About Kubernetes on DCOS](#about-kubernetes-on-dcos)
|
||||
- [Resources](#resources)
|
||||
- [Prerequisites](#prerequisites)
|
||||
- [Install](#install)
|
||||
- [Uninstall](#uninstall)
|
||||
|
||||
<!-- END MUNGE: GENERATED_TOC -->
|
||||
|
||||
|
||||
## About Kubernetes on DCOS
|
||||
@@ -83,70 +87,70 @@ Explore the following resources for more information about Kubernetes, Kubernete
|
||||
|
||||
1. Configure and validate the [Mesosphere Multiverse](https://github.com/mesosphere/multiverse) as a package source repository
|
||||
|
||||
```
|
||||
$ dcos config prepend package.sources https://github.com/mesosphere/multiverse/archive/version-1.x.zip
|
||||
$ dcos package update --validate
|
||||
```
|
||||
```
|
||||
$ dcos config prepend package.sources https://github.com/mesosphere/multiverse/archive/version-1.x.zip
|
||||
$ dcos package update --validate
|
||||
```
|
||||
|
||||
2. Install etcd
|
||||
|
||||
By default, the Kubernetes DCOS package starts a single-node etcd. In order to avoid state loss in the event of Kubernetes component container failure, install an HA [etcd-mesos](https://github.com/mesosphere/etcd-mesos) cluster on DCOS.
|
||||
By default, the Kubernetes DCOS package starts a single-node etcd. In order to avoid state loss in the event of Kubernetes component container failure, install an HA [etcd-mesos](https://github.com/mesosphere/etcd-mesos) cluster on DCOS.
|
||||
|
||||
```
|
||||
$ dcos package install etcd
|
||||
```
|
||||
```
|
||||
$ dcos package install etcd
|
||||
```
|
||||
|
||||
3. Verify that etcd is installed and healthy
|
||||
|
||||
The etcd cluster takes a short while to deploy. Verify that `/etcd` is healthy before going on to the next step.
|
||||
The etcd cluster takes a short while to deploy. Verify that `/etcd` is healthy before going on to the next step.
|
||||
|
||||
```
|
||||
$ dcos marathon app list
|
||||
ID MEM CPUS TASKS HEALTH DEPLOYMENT CONTAINER CMD
|
||||
/etcd 128 0.2 1/1 1/1 --- DOCKER None
|
||||
```
|
||||
```
|
||||
$ dcos marathon app list
|
||||
ID MEM CPUS TASKS HEALTH DEPLOYMENT CONTAINER CMD
|
||||
/etcd 128 0.2 1/1 1/1 --- DOCKER None
|
||||
```
|
||||
|
||||
4. Create Kubernetes installation configuration
|
||||
|
||||
Configure Kubernetes to use the HA etcd installed on DCOS.
|
||||
Configure Kubernetes to use the HA etcd installed on DCOS.
|
||||
|
||||
```
|
||||
$ cat >/tmp/options.json <<EOF
|
||||
{
|
||||
"kubernetes": {
|
||||
"etcd-mesos-framework-name": "etcd"
|
||||
```
|
||||
$ cat >/tmp/options.json <<EOF
|
||||
{
|
||||
"kubernetes": {
|
||||
"etcd-mesos-framework-name": "etcd"
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
```
|
||||
EOF
|
||||
```
|
||||
|
||||
5. Install Kubernetes
|
||||
|
||||
```
|
||||
$ dcos package install --options=/tmp/options.json kubernetes
|
||||
```
|
||||
```
|
||||
$ dcos package install --options=/tmp/options.json kubernetes
|
||||
```
|
||||
|
||||
6. Verify that Kubernetes is installed and healthy
|
||||
|
||||
The Kubernetes cluster takes a short while to deploy. Verify that `/kubernetes` is healthy before going on to the next step.
|
||||
The Kubernetes cluster takes a short while to deploy. Verify that `/kubernetes` is healthy before going on to the next step.
|
||||
|
||||
```
|
||||
$ dcos marathon app list
|
||||
ID MEM CPUS TASKS HEALTH DEPLOYMENT CONTAINER CMD
|
||||
/etcd 128 0.2 1/1 1/1 --- DOCKER None
|
||||
/kubernetes 768 1 1/1 1/1 --- DOCKER None
|
||||
```
|
||||
```
|
||||
$ dcos marathon app list
|
||||
ID MEM CPUS TASKS HEALTH DEPLOYMENT CONTAINER CMD
|
||||
/etcd 128 0.2 1/1 1/1 --- DOCKER None
|
||||
/kubernetes 768 1 1/1 1/1 --- DOCKER None
|
||||
```
|
||||
|
||||
7. Verify that Kube-DNS & Kube-UI are deployed, running, and ready
|
||||
|
||||
```
|
||||
$ dcos kubectl get pods --namespace=kube-system
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
kube-dns-v8-tjxk9 4/4 Running 0 1m
|
||||
kube-ui-v2-tjq7b 1/1 Running 0 1m
|
||||
```
|
||||
```
|
||||
$ dcos kubectl get pods --namespace=kube-system
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
kube-dns-v8-tjxk9 4/4 Running 0 1m
|
||||
kube-ui-v2-tjq7b 1/1 Running 0 1m
|
||||
```
|
||||
|
||||
Names and ages may vary.
|
||||
Names and ages may vary.
|
||||
|
||||
|
||||
Now that Kubernetes is installed on DCOS, you may wish to explore the [Kubernetes Examples](../../examples/README.md) or the [Kubernetes User Guide](../user-guide/README.md).
|
||||
@@ -156,24 +160,24 @@ Now that Kubernetes is installed on DCOS, you may wish to explore the [Kubernete
|
||||
|
||||
1. Stop and delete all replication controllers and pods in each namespace:
|
||||
|
||||
Before uninstalling Kubernetes, destroy all the pods and replication controllers. The uninstall process will try to do this itself, but by default it times out quickly and may leave your cluster in a dirty state.
|
||||
Before uninstalling Kubernetes, destroy all the pods and replication controllers. The uninstall process will try to do this itself, but by default it times out quickly and may leave your cluster in a dirty state.
|
||||
|
||||
```
|
||||
$ dcos kubectl delete rc,pods --all --namespace=default
|
||||
$ dcos kubectl delete rc,pods --all --namespace=kube-system
|
||||
```
|
||||
```
|
||||
$ dcos kubectl delete rc,pods --all --namespace=default
|
||||
$ dcos kubectl delete rc,pods --all --namespace=kube-system
|
||||
```
|
||||
|
||||
2. Validate that all pods have been deleted
|
||||
|
||||
```
|
||||
$ dcos kubectl get pods --all-namespaces
|
||||
```
|
||||
```
|
||||
$ dcos kubectl get pods --all-namespaces
|
||||
```
|
||||
|
||||
3. Uninstall Kubernetes
|
||||
|
||||
```
|
||||
$ dcos package uninstall kubernetes
|
||||
```
|
||||
```
|
||||
$ dcos package uninstall kubernetes
|
||||
```
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
|
Reference in New Issue
Block a user