website/docs/getting-started-guides/kargo.md

101 lines
4.9 KiB
Markdown
Raw Normal View History

---
title: Installing Kubernetes On-premise/Cloud Providers with Kargo
---
## Overview
This quickstart helps to install a Kubernetes cluster hosted
on GCE, Azure, OpenStack, AWS or Baremetal with
[`Kargo`](https://github.com/kubernetes-incubator/kargo) tool.
Kargo is a composition of [Ansible](http://docs.ansible.com/) playbooks,
[inventory](https://github.com/kubernetes-incubator/kargo/blob/master/docs/ansible.md)
generation CLI tools and domain knowledge for generic OS/Kubernetes
clusters configuration management tasks. It provides:
* [High available cluster](https://github.com/kubernetes-incubator/kargo/blob/master/docs/ha-mode.md)
* [Composable](https://github.com/kubernetes-incubator/kargo/blob/master/docs/vars.md)
(Choice of the network plugin, for instance)
* Support most popular Linux
[distributions](https://github.com/kubernetes-incubator/kargo#supported-linux-distributions)
* Continuous integration tests
To choose a tool which fits your use case the best, you may want to read this
[comparison](https://github.com/kubernetes-incubator/kargo/blob/master/docs/comparisons.md)
to [kubeadm](../kubeadm) and [kops](../kops).
## Creating a cluster
### (1/4) Ensure the underlay [requirements](https://github.com/kubernetes-incubator/kargo#requirements) are met
#### Checklist
* You must have cloud instances or baremetal nodes running for your future Kubernetes cluster.
A way to achieve that is to use the
[kargo-cli tool](https://github.com/kubernetes-incubator/kargo/blob/master/docs/getting-started.md).
* Or provision baremetal hosts with a tool-of-your-choice or launch cloud instances,
then create an inventory file for Ansible with this [tool](https://github.com/kubernetes-incubator/kargo/blob/master/contrib/inventory_builder/inventory.py).
### (2/4) Compose the deployment
#### Checklist
* Customize your deployment by usual Ansible meanings, which is
[generating inventory](https://github.com/kubernetes-incubator/kargo/blob/master/docs/getting-started.md#building-your-own-inventory)
and overriding default data [variables](https://github.com/kubernetes-incubator/kargo/blob/master/docs/vars.md).
Move init containers to stable in v1.6 (#1939) * Delete the parameter "--google-json-key string" Delete the parameter "--google-json-key string" * Fix apimachinery vendored dependencies in examples_test. * package apt-transport-https should be installed Ubuntu default install not include apt-transport-https. so if you want to download package from https repo, you need install apt-transport-https package first * doc-walkthrough-content modify * limitrange-update I think it's redundant that the second to ,in order to do sth and do sth!thanks! * fix command kubectl get svc,pod output fix command kubectl get svc,pod output * Fix typo: federation-controller-mananger => federation-controller-manager * Fix typo: federation-controller-mananger => federation-controller-manager * Clarify minimum version of kubernetes supporting PSP authz * Provide correct location for KUBE_ETCD_SERVERS Provide correct location for KUBE_ETCD_SERVERS configuration key. It was previously listed as being in /etc/kubernetes/config but is actually in /etc/kubernetes/apiserver. Related: https://github.com/kubernetes/kubernetes.github.io/issues/1600 * Move Compute Resources topic to Concepts. (#2410) * Delete the parameter "--google-json-key string" “# kube-scheduler -help”can not find --google-json-key option # kubectl version Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.1+82450d0", GitCommit:"f5ef9802914a47c848fd84c287333f8b4d28bbc1", GitTreeState:"dirty", BuildDate:"2017-01-23T00:04:39Z", GoVersion:"go1.7", Compiler:"gc", Platform:"linux/amd64", USEEVersion:"V1.02.01_alpha", USEEPublishDate:"2017-1-10 00:00:00"} Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.1+82450d0", GitCommit:"f5ef9802914a47c848fd84c287333f8b4d28bbc1", GitTreeState:"dirty", BuildDate:"2017-01-22T23:56:57Z", GoVersion:"go1.7", Compiler:"gc", Platform:"linux/amd64", USEEVersion:"V1.02.01_alpha", USEEPublishDate:"2017-1-10 00:00:00"} * Add diagnose tips when you face problem. * Update grammar for kubeadm.md, thanks @chenopis * Merge two pieces to one words * add http proxy infomation in kubeadm * Update landing pages for Tasks and Tutorials. (#2634) * Update static-pods.md It works. Please review it again. * Move Guide Topic: Multi-container pods. (#2642) * fix link to go to pod-lifecycle page * fix the command output fix the command output * mirantis_logo.png ,/images/community_logos/mirantis_logo.png updated per Mirantis request * kubeadm reference -- / set up/manage mean set up or manage ? it's better use or? * Prototype for deprecating User Guide topic. * missing word The return of the OCD. * Move Guide topic: Using Environment Variables. (#2645) * fix typo (#2656) fix typo * Move Guide topic: Using Port Forwarding. (#2661) * Move Guide topic: Bootstrapping Pet Sets. (#2662) * Move Guide topic: Bootstrapping Pet Sets. * Add TOC entry. * Move Guide topic: Connect with Proxies. (#2663) * Move Guide topic: Connect with Proxies. * Fix link. * add DefaultTolerationSeconds admission controller * getting-started-guides: add CoreOS Tectonic * Correct the certificate name * Update index.md * Update installation.md * Update validation.md * Update backups.md * Update backups.md * Spell fixes * Using it vs Juju Kubernetes * Q1 update to k8s tech and service partner list New partners registered to K8s Partner Ecosystem sign-up form. Logo updates companion to this edit still WIP * Logo file updates for new registrants Logos for new registrants * The attribute [allowfullscree] must have a value Signed-off-by: yupengzte <yu.peng36@zte.com.cn> * Remove newline before passing to base64 * Use single quote to avoid string interpolation, update output * Update command as files contain no newline * Remove all dead links, use just filename As user can guess that it is file copied from the shown content * Fix link to dev guide. * Add --leader-elect=false Second scheduler could not start without disabling leader-elect. * cluster-components-could be running could be doing sth * update cluster-components.md In theory,Master components can be run.... * update cluster-components--add a space add a space after the comma: "In theory, Master components..." * Highlighted command --kubectl describe In web page ,there is no space ,need some empty space,thanks! * Revert "Highlighted command --kubectl describe" This reverts commit a70d0a3e3537c3f91b197b23f949e1e506c951d1. * Add example show how to configure proxy for kube * Revision as the suggestion describe * move ha-master-gce.png to images/docs Signed-off-by: Xiuyu Li <nickleefly@gmail.com> * use relative path for ha-master-gce image Signed-off-by: Xiuyu Li <nickleefly@gmail.com> * The attribute [calendarWrapper] must be unique Signed-off-by: yupengzte <yu.peng36@zte.com.cn> * add required images in kubeadm init step * Add links to Docker/rtk in cluster-intro.html * s/acomplish/accomplish/ * Modify the link URL of [kubelet eviction design doc] [kubelet eviction design doc] should be linked to kubernetes.github.io instead of community/design-proposal. * fix CronJob object name fix CronJob object name * remove redundant a Signed-off-by: Xiuyu Li <nickleefly@gmail.com> * kubeadm reference--change any to some (#2683) * modify one word examples to example * doc-walkthrough-content modify * limitrange-update I think it's redundant that the second to ,in order to do sth and do sth!thanks! * cluster-components-could be running could be doing sth * update cluster-components.md In theory,Master components can be run.... * update cluster-components--add a space add a space after the comma: "In theory, Master components..." * Highlighted command --kubectl describe In web page ,there is no space ,need some empty space,thanks! * Revert "Highlighted command --kubectl describe" This reverts commit a70d0a3e3537c3f91b197b23f949e1e506c951d1. * kubeadm reference--change any to some kubeadm can install any add-on ? * Move Guide topics: Logging (#2687) * Disallow indexing for liveness/index (#2689) * Deprecate Guide topics. (#2691) * Wrong label and kubectl get completed pods The label `app=jobexample` should be `jobgroup=jobexample`. Also, for get completed pods the flag `--show-all` is necessary. * Update garbage-collection.md change “any” to "every" * Deprecate Guide topic: Persistent Volume Walkthrough. (#2692) * Reimplement PR #2525 Fixes typo by removing the word "controller" * remove extra space * Update multiple-schedulers doc (#2063) * Update tutorial * Fix md formatting. * Remove extraneous space * Deprecate Guide topic: Secrets Walkthrough. (#2695) * Deprecate Guide topics: quick-start ... (#2696) * Update Tasks landing page. (#2697) * Remove redundant section in deployments The status of the deployment is already covered in a later section in this doc. * Repair Spotinst logo Corrected size * fixed ASM blurb * Correct ASM logo filename * Highlighted command for `kubectl proxy`. * Update ubuntu install instructions. * Update local instructions to new method. * update init-containers.md add one word. * Minor spelling correction -- "rtk" to "rkt" * fixing typo * Doc formatting update Corrected indentation for the `nonResourcePath` and got a bit zealous with restructuring that section... * Repair Spotinst logo Corrected size * fixed ASM blurb * Correct ASM logo filename * Update garbage-collection.md change "any" to "every" * Update Weave Net's title. * fix unsupported parameter of wget command * update to be retained change "retain" to "to be retained". * Update pod.md * update init-containers.md change "a different filesystem view" to "different filesystem views". different init container should have different filesystem. * Highlighted command --kubectl describe In web page ,there is no space ,need some empty space,thanks! * cluster-management--3 change 3 to three is better or not ?thanks! * fix typo 1、Parameters “--allow-verification-with-non-compliant-keys” is missed. 2、Delete the parameter "--google-json-key string"; see the "# kube-controller-manager -help" # kubectl version Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.1+82450d0", GitCommit:"f5ef9802914a47c848fd84c287333f8b4d28bbc1", GitTreeState:"dirty", BuildDate:"2017-01-23T00:04:39Z", GoVersion:"go1.7", Compiler:"gc", Platform:"linux/amd64", USEEVersion:"V1.02.01_alpha", USEEPublishDate:"2017-1-10 00:00:00"} Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.1+82450d0", GitCommit:"f5ef9802914a47c848fd84c287333f8b4d28bbc1", GitTreeState:"dirty", BuildDate:"2017-01-22T23:56:57Z", GoVersion:"go1.7", Compiler:"gc", Platform:"linux/amd64", USEEVersion:"V1.02.01_alpha", USEEPublishDate:"2017-1-10 00:00:00"} * fix typo 1、Delete the parameter "--google-json-key string"; 2、Parameters "--ir-data-source string"、"--ir-dbname string"、"--ir-hawkular string"、"--ir-influxdb-host string"、"--ir-namespace-only"、"--ir-password string"、"--ir-percentile int"、"--ir-user string" is missed. see the "# kube-prxoy -help" # kubectl version Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.1+82450d0", GitCommit:"f5ef9802914a47c848fd84c287333f8b4d28bbc1", GitTreeState:"dirty", BuildDate:"2017-01-23T00:04:39Z", GoVersion:"go1.7", Compiler:"gc", Platform:"linux/amd64", USEEVersion:"V1.02.01_alpha", USEEPublishDate:"2017-1-10 00:00:00"} Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.1+82450d0", GitCommit:"f5ef9802914a47c848fd84c287333f8b4d28bbc1", GitTreeState:"dirty", BuildDate:"2017-01-22T23:56:57Z", GoVersion:"go1.7", Compiler:"gc", Platform:"linux/amd64", USEEVersion:"V1.02.01_alpha", USEEPublishDate:"2017-1-10 00:00:00"} * Update garbage-collection.md modify the url and link * update garbage-collection.md change the url to relative path. * update out-of-resource.md change "in cases when" to "in case that" * update out-of-resource.md use a shorter and simpler expression. * update out-of-resource.md change "support" to "supports" * Create a top-level CN directory to hold future md files for the Chinese kubernetes site * Removed `=` at the end of the flags. * Remove autogenerate todo - This should be captured via a GitHub issue and not a TODO in the README documentation which leads to confusion. * Move Guide topics: Federation Tasks. (#2799) * Move Guide topics: Federation tutorial and concept. (#2802) * Move Guide topics: Federation tutorial and concept. * Add title. * Fix link. * Move kubectl Concept topics to Tutorials. (#2804) * Move kubectl Concept topics to Tutorials. * Add redirects and update links. * The calendarWrapper attribute should be unique Signed-off-by: yupengzte <yu.peng36@zte.com.cn> * Fix links. (#2808) * Fix link. (#2806) * Move topic from clusters to cluster-administration. (#2812) * Move a batch of cluster admin topics. (#2813) * Move Guide topic: Limit storage consumption. (#2814) * Move Guide topic: Limit storage consumption. * Add title. * Move Guide topic: Networking. (#2816) * Move Guide topic: Network Plugins. (#2819) * Move Guide topic: Network Plugins. * Fix link. * Move Guide topic: Static Pods. (#2820) * User Guide content migration: post notice (#2818) * Add User Guide content migration notice. * Fix formatting * Tweek formatting to block highlight text in light gray. * Try table instead of code block * remove extra lines * try table format * fix links * incorporate @ddonnelly feedback * Move Guide topic: Out of Resource. (#2821) * Move Guide topic: Monitoring Node Health. (#2822) * Move Guide topic: Monitoring Node Health. * Move to Tasks. * Move Guide topic: AppArmor. (#2823) * Apparmor (#2825) * Move Guide topic: AppArmor. * Add included files. * Move Guide topic: Audit. (#2824) * Added 1.6 Upgrade notes to outline changes for etcd 3. * Move Guide topic: Disruption Budget. (#2834) * Move Guide topic: Limit range. (#2835) * Quota (#2836) * Move Guide topic: Limit range. * Move Guide topic: Resource Quota and Limits. * Quota2 (#2838) * Move Guide topic: Limit range. * Move Guide topic: Resource Quota concept. * Dns (#2839) * Move Guide topic: Limit range. * Move Guide topic: DNS. * Delete CNAME * Create CNAME * Delete CNAME * Create CNAME * Move docs/user-guide/managing-deployments.md to /docs/concepts/cluster-administration/manage-deployment.md * add nginx-app.yaml file * add back missing / * fix link * Move Guide topic: Replication Controller Operations * Move Guide topic: Resizing a replication controller * Concepts toc (#2840) * Move Guide topic: Limit range. * Adjust Concepts Overview TOC. * Move Guide topic: Rolling Updates * Move Kubernetes API page. (#2849) * Move What is Kubernetes topic. (#2851) * Move Guide topic: Rolling Update Demo (#2850) * Move Guide topic: Rolling Update Demo * rename file * Move Guide topic: Configuration Best Practices * Move Guide topic: Jobs (#2853) * Move Guide topic: Jobs * add job.yaml file * change title * Move Pod overview. (#2865) * Move Pod overview. * Fix redirection. * Move Guide topic: Parallel Processing using Expansions (#2867) * Move Guide topic: Parallel Processing using Expansions * fix links to /docs/user-guide/jobs/ * Move Init Containers topic. (#2866) * Move Guide topic: Coarse Parallel Processing Using a Work Queue * Move Guide topic: Fine Parallel Processing using a Work Queue (#2870) * Move Guide topic: Fine Parallel Processing using a Work Queue * add migration notice * fixed capitalization * Rename /docs/tasks/job/work-queue-1/ * Move StatefulSets topic. (#2869) * Move StatefulSets topic. * Fix TOC. * Move Guide topic: Pod Templates (#2872) * Move Guide topic: Pod Templates * tweak header level and capitalization * Move PetSets topic. (#2873) * Move Garbage Collection topic. (#2874) * Move Garbage Collection topic. * Fix included file. * Move Guide topic: Prereqs * Move Guide topic: Sharing Clusters * Move Accessing Clusters topic to Concepts. (#2875) * Move Accessing Clusters topic to Concepts. * Update concepts.yml * Move Guide topic: Kubeconfig File * Move Guide topic: Config Provider Firewalls. (#2883) * Move Guide topic: Federation Service Discovery. (#2884) * Move Guide topic: Connecting Apps with Services. (#2885) * Added example and docu for hostPort ranges * Move Guide topic: Service. (#2891) * Move Guide topic: Service. * Move Guide topic: External Load Balancer. * Fix TOC. * Move Guide topic: Resource Monitoring. (#2895) * docs/admin: document OpenID Connect plugin's claim prefixing * Move Guide topic: Admin Guide * fix the command output fix the command output * Update manage-compute-resources-container.md Change "he" to "The" * update out-of-resource.md change "thresholds" to "threshold" * update init-containers.md change "apply" to "application" * amend monitor-node-health.md Amend the url link. * Fix monitor-node-health.md The url link does not exist. * fix a typo in /docs/user-guide/configmap/index.md change "value" to "values" * View $PAGE on Github without forking the repo Adding a "View docs/bla-bla.md on GitHub" button next to the "Edit docs/bla-bla.md" button so that people can view the file first without clicking the Edit button (which does not work without forking the repository). I did not need this because I was trying to do something without forking. I just found it to be bit difficult to view source of a page on GitHub. I'm open to ideas, perhaps we can instead add an article footer button named "View on GitHub" next to the "Edit this Page". Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com> * Move Guide topics: Container Lifestyle Hooks, Images, Volumes * fix to taint the master node * Add files via upload * fix the link of ogging-elasticsearch-kibana.md fix the link of url * Remove from TOC/Search: pods/init-containers ... (#2694) * Fix typo * Add files via upload * Create hyperlink Create hyperlink for kubernetes repo link. * updated PSP documentation with RBAC (#2552) Added info about controller manager setup and current implementation when using PSP with RBAC support. * Use kubectl config current-context to simplify the instructions * fix typeo (#2856) * fix typeo * Update kargo.md * Fix typo in kubectl_completion.md evaluation --> evaluated * Apply typo fixes from #2791 (#2949) * Apply typo fixes from #2791 * remove style typos * Fix the typos Signed-off-by: yupengzte <yu.peng36@zte.com.cn> * Fix typo * Fix typo (#2842)
2017-03-22 01:13:33 +00:00
Or just stick with default values (Kargo will choose Calico networking plugin for you
then). This includes steps like deciding on the:
* DNS [configuration options](https://github.com/kubernetes-incubator/kargo/blob/master/docs/dns-stack.md)
* [Networking plugin](https://github.com/kubernetes-incubator/kargo#network-plugins) to use
* [Versions](https://github.com/kubernetes-incubator/kargo#versions-of-supported-components)
of components.
* Additional node groups like [bastion hosts](https://github.com/kubernetes-incubator/kargo/blob/master/docs/ansible.md#bastion-host) or
[Calico BGP route reflectors](https://github.com/kubernetes-incubator/kargo/blob/master/docs/calico.md#optional--bgp-peering-with-border-routers).
* Plan custom deployment steps, if any, or use the default composition layer in the
[cluster definition file](https://github.com/kubernetes-incubator/kargo/blob/master/cluster.yml).
Taking the best from Ansible world, Kargo allows users to execute arbitrary steps via the
``ansible-playbook`` with given inventory, playbooks, data overrides and tags, limits, batches
of nodes to deploy and so on.
* For large deployments (100+ nodes), you may want to
[tweak things](https://github.com/kubernetes-incubator/kargo/blob/master/docs/large-deployments.md)
for best results.
### (3/4) Run the deployment
#### Checklist
* Apply deployment with
[kargo-cli tool](https://github.com/kubernetes-incubator/kargo/blob/master/docs/getting-started.md)
or ``ansible-playbook``
[manual commands](https://github.com/kubernetes-incubator/kargo/blob/master/docs/getting-started.md#starting-custom-deployment).
### (4/4) (Optional) verify inter-pods connectivity and DNS resolve with [Netchecker](https://github.com/kubernetes-incubator/kargo/blob/master/docs/netcheck.md)
#### Checklist
* Enusre the netchecker-agent's pods can resolve DNS requests and ping each over within the default namespace.
Those pods mimic similar behavior of the rest of the workloads and serve as cluster health indicators.
## Explore contributed add-ons
See the [list of contributed playbooks](https://github.com/kubernetes-incubator/kargo/tree/master/contrib)
to explore other deployment options.
## What's next
Kargo has quite a few [marks on the radar](https://github.com/kubernetes-incubator/kargo/blob/master/docs/roadmap.md).
## Cleanup
To delete your scratch cluster, you can apply the
[reset role](https://github.com/kubernetes-incubator/kargo/blob/master/roles/reset/tasks/main.yml)
with the manual ``ansible-playbook`` command.
Note, that it is highly unrecommended to delete production clusters with the reset playbook!
## Feedback
* Slack Channel: [#kargo](https://kubernetes.slack.com/messages/kargo/)
* [GitHub Issues](https://github.com/kubernetes-incubator/kargo/issues)