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.
Before you can install Kubed, you need a cluster config for Kubed. Cluster config is defined in YAML format. You find an example config in ./hack/deploy/config.yaml.
$ cat ./hack/deploy/config.yaml
apiServer:
address: :8080
enableReverseIndex: true
enableSearchIndex: true
clusterName: unicorn
enableConfigSyncer: true
eventForwarder:
ingressAdded:
handle: true
nodeAdded:
handle: true
receivers:
- notifier: Mailgun
to:
- ops@example.com
storageAdded:
handle: true
warningEvents:
handle: true
namespaces:
- kube-system
janitors:
- elasticsearch:
endpoint: http://elasticsearch-logging.kube-system:9200
logIndexPrefix: logkubed-
kind: Elasticsearch
ttl: 2160h0m0s
- influxdb:
endpoint: https://monitoring-influxdb.kube-system:8086
kind: InfluxDB
ttl: 2160h0m0s
notifierSecretName: notifier-config
recycleBin:
handleUpdates: false
path: /tmp/kubed/trash
receivers:
- notifier: Mailgun
to:
- ops@example.com
ttl: 168h0m0s
snapshotter:
gcs:
bucket: restic
prefix: minikube
sanitize: true
schedule: '@every 6h'
storageSecretName: snap-secret
To understand the various configuration options, check Kubed tutorials. Once you are satisfied with the configuration, create a Secret with the Kubed cluster config under config.yaml
key.
You may have to create another Secret for notifiers, usually called notifier-config
. If you are storing cluster snapshots in cloud storage, you have to create another Secret to provide cloud credentials.
If you are familiar with GO, you can use the ./hack/config/main.go script to generate a cluster config. Open this file in your favorite editor, update the config returned from #CreateClusterConfig()
method. Then run the script to generate updated config in ./hack/deploy/config.yaml.
go run ./hack/config/main.go
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 using YAML files includes in the /hack/deploy folder.
# Install without RBAC roles
$ kubectl apply -f https://raw.githubusercontent.com/appscode/kubed/0.4.0/hack/deploy/without-rbac.yaml
# Install with RBAC roles
$ kubectl apply -f https://raw.githubusercontent.com/appscode/kubed/0.4.0/hack/deploy/with-rbac.yaml
Kubed can be installed via Helm using the chart included in this repository. To install the chart with the release name my-release
:
$ helm repo update
$ helm install stable/kubed --name my-release
To see the detailed configuration options, visit here.
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
.
If you would like to update cluster config, update the kubed-config
Secret and restart Kubed operator pod(s).