You are looking at the documentation of a prior release. To read the documentation of the latest release, please
visit here.
New to Kubed? Please start here.
Installation Guide
Kubed operator can be installed via a script or as a Helm chart.
Using Helm 3
Kubed can be installed via Helm using the chart from AppsCode Charts Repository. To install the chart with the release name my-release
:
$ helm repo add appscode https://charts.appscode.com/stable/
$ helm repo update
$ helm search repo appscode/kubed --version v0.12.0
NAME CHART VERSION APP VERSION DESCRIPTION
appscode/kubed v0.12.0 v0.12.0 Kubed by AppsCode - Kubernetes daemon
$ helm install kubed appscode/kubed \
--version v0.12.0 \
--namespace kube-system
To see the detailed configuration options, visit here.
Using Helm 2
Kubed can be installed via Helm using the chart from AppsCode Charts Repository. To install the chart with the release name my-release
:
$ helm repo add appscode https://charts.appscode.com/stable/
$ helm repo update
$ helm search appscode/kubed --version v0.12.0
NAME CHART VERSION APP VERSION DESCRIPTION
appscode/kubed v0.12.0 v0.12.0 Kubed by AppsCode - Kubernetes daemon
$ helm install appscode/kubed --name kubed \
--version v0.12.0 \
--namespace kube-system
To see the detailed configuration options, visit here.
Using YAML
If you prefer to not use Helm, you can generate YAMLs from Kubed chart and deploy using kubectl
. Here we are going to show the prodecure using Helm 3.
$ helm repo add appscode https://charts.appscode.com/stable/
$ helm repo update
$ helm search repo appscode/kubed --version v0.12.0
NAME CHART VERSION APP VERSION DESCRIPTION
appscode/kubed v0.12.0 v0.12.0 Kubed by AppsCode - Kubernetes daemon
$ helm template kubed appscode/kubed \
--version v0.12.0 \
--namespace kube-system \
--no-hooks | kubectl apply -f -
To see the detailed configuration options, visit here.
Installing in GKE Cluster
If you are installing Kubed on a GKE cluster, you will need cluster admin permissions to install Kubed operator. Run the following command to grant admin permision to the cluster.
$ kubectl create clusterrolebinding "cluster-admin-$(whoami)" \
--clusterrole=cluster-admin \
--user="$(gcloud config get-value core/account)"
In addition, if your GKE cluster is a private cluster, you will need to either add an additional firewall rule that allows master nodes access port 8443/tcp
on worker nodes, or change the existing rule that allows access to ports 443/tcp
and 10250/tcp
to also allow access to port 8443/tcp
. The procedure to add or modify firewall rules is described in the official GKE documentation for private clusters mentioned before.
Verify installation
Kubed includes a check command to verify a cluster config. Download the pre-built binary from appscode/kubed Github releases and put the binary to some directory in your PATH
.
$ kubed check --clusterconfig=./hack/deploy/config.yaml
Cluster config was parsed successfully.
Kubed can be installed via a script or as a Helm chart.
Using Script
Kubed can be installed via installer script included in the /hack/deploy folder.
# set cluster-name to something meaningful to you, say, prod, prod-us-east, qa, etc.
# so that you can distinguish notifications sent by kubed
$ curl -fsSL https://raw.githubusercontent.com/appscode/kubed/v0.12.0/hack/deploy/kubed.sh \
| bash -s -- --cluster-name=<your-cluster-name>
Customizing Installer
You can see the full list of flags available to installer using -h
flag.
$ curl -fsSL https://raw.githubusercontent.com/appscode/kubed/v0.12.0/hack/deploy/kubed.sh | bash -s -- -h
kubed.sh - install Kubernetes cluster daemon
kubed.sh [options]
options:
-h, --help show brief help
-n, --namespace=NAMESPACE specify namespace (default: kube-system)
--rbac create RBAC roles and bindings (default: true)
--docker-registry docker registry used to pull kubed images (default: appscode)
--image-pull-secret name of secret used to pull kubed operator images
--run-on-master run kubed operator on master
--cluster-name name of cluster (default: unicorn)
--enable-apiserver enable/disable kubed apiserver
--use-kubeapiserver-fqdn-for-aks if true, uses kube-apiserver FQDN for AKS cluster to workaround https://github.com/Azure/AKS/issues/522 (default true)
--enable-analytics send usage events to Google Analytics (default: true)
--uninstall uninstall kubed
If you would like to run Kubed operator pod in master
instances, pass the --run-on-master
flag:
$ curl -fsSL https://raw.githubusercontent.com/appscode/kubed/v0.12.0/hack/deploy/kubed.sh \
| bash -s -- --run-on-master [--rbac]
Kubed operator will be installed in a kube-system
namespace by default. If you would like to run Kubed operator pod in kubed
namespace, pass the --namespace=kubed
flag:
$ kubectl create namespace kubed
$ curl -fsSL https://raw.githubusercontent.com/appscode/kubed/v0.12.0/hack/deploy/kubed.sh \
| bash -s -- --namespace=kubed [--run-on-master] [--rbac]
If you are using a private Docker registry, you need to pull the following docker image:
To pass the address of your private registry and optionally a image pull secret use flags --docker-registry
and --image-pull-secret
respectively.
$ kubectl create namespace kubed
$ curl -fsSL https://raw.githubusercontent.com/appscode/kubed/v0.12.0/hack/deploy/kubed.sh \
| bash -s -- --docker-registry=MY_REGISTRY [--image-pull-secret=SECRET_NAME] [--rbac]
Using Helm
Kubed can be installed via Helm using the chart from AppsCode Charts Repository. To install the chart with the release name my-release
:
$ helm repo add appscode https://charts.appscode.com/stable/
$ helm repo update
$ helm search appscode/kubed
NAME CHART VERSION APP VERSION DESCRIPTION
appscode/kubed v0.12.0 v0.12.0 Kubed by AppsCode - Kubernetes daemon
# set cluster-name to something meaningful to you, say, prod, prod-us-east, qa, etc.
# so that you can distinguish notifications sent by kubed
# Kubernetes 1.8.x
$ helm install appscode/kubed --name kubed --version v0.12.0 \
--namespace kube-system \
--set config.clusterName=<your-cluster-name> \
--set apiserver.enabled=false
# Kubernetes 1.9.0 or later
$ helm install appscode/kubed --name kubed --version v0.12.0 \
--namespace kube-system \
--set config.clusterName=<your-cluster-name>
To see the detailed configuration options, visit here.
Installing in GKE Cluster
If you are installing Kubed on a GKE cluster, you will need cluster admin permissions to install Kubed operator. Run the following command to grant admin permision to the cluster.
# get current google identity
$ gcloud info | grep Account
Account: [user@example.org]
$ kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=user@example.org
Verify installation
To check if Kubed operator pods have started, run the following command:
$ kubectl get pods --all-namespaces -l app=kubed --watch
Once the operator pods are running, you can cancel the above command by typing Ctrl+C
.