diff --git a/docs/addons.md b/docs/addons.md index c57738c8d0..b20ed67771 100644 --- a/docs/addons.md +++ b/docs/addons.md @@ -214,117 +214,16 @@ spec: ``` -## Static addons +## Custom addons The command `kops create cluster` does not support specifying addons to be added to the cluster when it is created. Instead they can be added after cluster creation using kubectl. Alternatively when creating a cluster from a yaml manifest, addons can be specified using `spec.addons`. + ```yaml spec: addons: - - manifest: kubernetes-dashboard - - manifest: s3://kops-addons/addon.yaml + - manifest: s3://my-kops-addons/addon.yaml ``` -This document describes how to install some common addons and how to create your own custom ones. - -### Available addons - -#### Ambassador - -The [Ambassador API Gateway](https://getambassador.io/) provides all the functionality of a traditional ingress -controller (i.e., path-based routing) while exposing many additional capabilities such as authentication, URL rewriting, -CORS, rate limiting, and automatic metrics collection. - -Install using: -``` -kubectl create -f https://raw.githubusercontent.com/kubernetes/kops/master/addons/ambassador/ambassador-operator.yaml -``` - -Detailed installation instructions in the [addon documentation](https://github.com/kubernetes/kops/blob/master/addons/ambassador/README.md). -See [Ambassador documentation](https://www.getambassador.io/docs/) on configuration and usage. - -#### Dashboard - -The [dashboard project](https://github.com/kubernetes/dashboard) provides a nice administrative UI: - -Install using: -``` -kubectl create -f https://raw.githubusercontent.com/kubernetes/kops/master/addons/kubernetes-dashboard/v1.10.1.yaml -``` - -And then follow the instructions in the [dashboard documentation](https://github.com/kubernetes/dashboard/wiki/Accessing-Dashboard---1.7.X-and-above) to access the dashboard. - -The login credentials are: - -* Username: `admin` -* Password: get by running `kops get secrets kube --type secret -oplaintext` or `kubectl config view --minify` - -##### RBAC - -It's necessary to add your own RBAC permission to the dashboard. Please read the [RBAC](https://kubernetes.io/docs/admin/authorization/rbac/) docs before applying permissions. - -Below you see an example giving **cluster-admin access** to the dashboard. - -```yaml -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: kubernetes-dashboard - labels: - k8s-app: kubernetes-dashboard -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: cluster-admin -subjects: -- kind: ServiceAccount - name: kubernetes-dashboard - namespace: kube-system -``` - -### Monitoring with Heapster - Standalone - -**This addons is deprecated. Please use metrics-server instead** - -Monitoring supports the horizontal pod autoscaler. - -Install using: -``` -kubectl create -f https://raw.githubusercontent.com/kubernetes/kops/master/addons/monitoring-standalone/v1.11.0.yaml -``` -Please note that [heapster is retired](https://github.com/kubernetes/heapster/blob/master/docs/deprecation.md). Consider using [metrics-server](https://github.com/kubernetes-incubator/metrics-server) and a third party metrics pipeline to gather Prometheus-format metrics instead. - -### Monitoring with Prometheus Operator + kube-prometheus - -The [Prometheus Operator](https://github.com/coreos/prometheus-operator/) makes the Prometheus configuration Kubernetes native and manages and operates Prometheus and Alertmanager clusters. It is a piece of the puzzle regarding full end-to-end monitoring. - -[kube-prometheus](https://github.com/coreos/prometheus-operator/blob/master/contrib/kube-prometheus) combines the Prometheus Operator with a collection of manifests to help getting started with monitoring Kubernetes itself and applications running on top of it. - -```console -kubectl apply -f https://raw.githubusercontent.com/kubernetes/kops/master/addons/prometheus-operator/v0.26.0.yaml -``` - -### Route53 Mapper - -**This addon is deprecated. Please use [external-dns](https://github.com/kubernetes-sigs/external-dns) instead.** - -Please note that kOps installs a Route53 DNS controller automatically (it is required for cluster discovery). -The functionality of the route53-mapper overlaps with the dns-controller, but some users will prefer to -use one or the other. -[README for the included dns-controller](https://github.com/kubernetes/kops/blob/master/dns-controller/README.md) - -route53-mapper automates creation and updating of entries on Route53 with `A` records pointing -to ELB-backed `LoadBalancer` services created by Kubernetes. Install using: - -The project is created by wearemolecule, and maintained at -[wearemolecule/route53-kubernetes](https://github.com/wearemolecule/route53-kubernetes). -[Usage instructions](https://github.com/kubernetes/kops/blob/master/addons/route53-mapper/README.md) - -``` -kubectl apply -f https://raw.githubusercontent.com/kubernetes/kops/master/addons/route53-mapper/v1.3.0.yml -``` - -### Custom addons - The docs about the [addon management](contributing/addons.md#addon-management) describe in more detail how to define a addon resource with regards to versioning. Here is a minimal example of an addon manifest that would install two different addons. @@ -356,7 +255,8 @@ addon.yaml v0.0.1.yaml ``` -The yaml files in the foo/bar folders can be any kubernetes resource. Typically this file structure would be pushed to S3 or another of the supported backends and then referenced as above in `spec.addons`. In order for master nodes to be able to access the S3 bucket containing the addon manifests, one might have to add additional iam policies to the master nodes using `spec.additionalPolicies`, like so; +The yaml files in the foo/bar folders can be any kubernetes resource. Typically this file structure would be pushed to S3 or another of the supported backends and then referenced as above in `spec.addons`. In order for master nodes to be able to access the S3 bucket containing the addon manifests, one might have to add additional iam policies to the master nodes using `spec.additionalPolicies`, like so: + ```yaml spec: additionalPolicies: @@ -367,7 +267,7 @@ spec: "Action": [ "s3:GetObject" ], - "Resource": ["arn:aws:s3:::kops-addons/*"] + "Resource": ["arn:aws:s3:::my-kops-addons/*"] }, { "Effect": "Allow", @@ -375,7 +275,7 @@ spec: "s3:GetBucketLocation", "s3:ListBucket" ], - "Resource": ["arn:aws:s3:::kops-addons"] + "Resource": ["arn:aws:s3:::my-kops-addons"] } ] ```