Chapter nineteenth analysis with you easily complete explosion helm3 heapster

Note: can I  Baidu network disk  directly download helm, minio and the edited gitlab, nginx-ingress, nexus, heapster Resource Kit


This series of articles:

Chapter One: Helm  one minute after blasting easily

Chapter II: Helm  relaxed after blasting a public warehouse

Chapter III: Helm  relaxed after blasting private warehouse

Chapter IV: Helm relaxed after blasting chart

Chapter V: Helm easy release after explosion

Chapter 6: nine analyze with you easily complete explosion helm gitlab

Chapter 7: nine analyze with you easily complete explosion helm nginx-ingress

Chapter 8: nine analyze with you easily complete explosion helm gitlab nfs

Chapter 9: nine analyze with you easily complete explosion helm nexus

Chapter X: nine analyze with you easily complete explosion helm3 heapster

table of Contents

1 heapster Introduction

2 heapster Download

3 heapster Configuration

    3.1 Editing values.yaml file

    3.2 Creating serviceaccount and clusterrolebinding

4 heapster installation

    4.1 modify the deployment apiVersion

    4.2 Adding deployment selector

5 heapster use


1 heapster Introduction

        heapster the cluster nodes to monitor and analyze the components k8s officially supported. It first acquired from the master node to all nodes, and then get the data from each node of kubelet, and kubelet data monitoring client cAdvisor is running on each node in the acquisition. The relationship between the three is shown below. heaspter can be acquired monitoring information to guide grafana or k8s dashboard and other reports show tool for display.

heapster.png

        This chapter uses helm v3.0.0 to install heapster.


2 heapster Download

clipboard1.png

helm pull stable/heapster


3 heapster Configuration

3.1 Editing values.yaml file

        Modify Mirror, startup items and rbac account:

image:

    repository: registry.aliyuncs.com/google_containers/heapster-amd64

  tag: v1.5.2


command:

    - "/heapster"

    - "--source=kubernetes.summary_api:https://kubernetes.default?kubeletPort=10250&kubeletHttps=true&insecure=true"


rbac:

    ServiceAccountName: heapster-jiuxi

3.2 Creating serviceaccount and clusterrolebinding

        Creating heapster-jiuxi.yaml file, as follows:

apiVersion: v1

kind: ServiceAccount

metadata:

  name: heapster-jiuxi

  namespace: kube-system

  labels:

    kubernetes.io/cluster-service: "true"

    addonmanager.kubernetes.io/mode: Reconcile

---

apiVersion: rbac.authorization.k8s.io/v1

kind: ClusterRoleBinding

metadata:

  annotations:

    rbac.authorization.kubernetes.io/autoupdate: "true"

  name: heapster-jiuxi

roleRef:

  apiGroup: rbac.authorization.k8s.io

  kind: ClusterRole

  name: cluster-admin

subjects:

- kind: ServiceAccount

  name: heapster-jiuxi

  namespace: kube-system

        Execution heapster-jiuxi.yaml file:

kubectl apply f heap steroid jiuxi.yaml


4 heapster installation

helm install heapster -n kube-system heapster

        If there is an error as follows, indicating your k8s version is too high, too avant-garde:

4.1 modify the deployment apiVersion

   Error: unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "Deployment" in version "extensions/v1beta1"

        Execute the following statement, relaxed after blasting:

grep -irl 'extensions/v1beta1' heapster/ | xargs sed -i 's#extensions/v1beta1#apps/v1#g'

4.2 Adding deployment selector

        If you perform or error, the error reads as follows:

   Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(Deployment.spec): missing required field "selector" in io.k8s.api.apps.v1.DeploymentSpe

        Edit templates / deployment.yaml file, add content as shown below:

clipboard2.png

        Executed again, heapster successful installation. Screenshot below:

clipboard3.png


5 heapster use

kubectl top nodes

spacer.gif064154966861.png

        Note: If the command is executed, display error: metrics not available yet, you can wait a little, since the establishment of communication and access to information will take some time.

064239805156.png

        Since then, helm3 relaxed after blasting heapster.

Guess you like

Origin blog.51cto.com/14625168/2457793