Cloud Pak for Data

 View Only
  • 1.  How to install the metric server in Openshift v3.11

    Posted Wed February 12, 2020 10:58 AM
    We always get this message in "manage of platform".
    "To see your resource usage, a Red Hat OpenShift administrator must install Kubernetes Incubator Metrics Server on the cluster. For details, see the software requirements in the system requirements documentation."

    However, the URL above was expired nowadays so that we cannot know the way of installing the metric-server.
    We demand the URL where the installation of metric-server for openshift v3.11(kubernetes v1.11.0+d4cacc0) is introduced because the previous one was that for minikube.
    Otherwise, could someone tell me the way of the installation here?

    Warm regards,

    ------------------------------
    Chris
    ------------------------------

    #CloudPakforDataGroup


  • 2.  RE: How to install the metric server in Openshift v3.11

    Posted Wed February 12, 2020 11:01 AM
    Hi,

    Please try this:

    1. git clone https://github.com/kubernetes-sigs/metrics-server.git
    2. cd metrics-server; kubectl create -f deploy/1.8+/
    3.(may not be necessary)  oc edit deployments metrics-server -n kube-system and modify "kubernetes.io/arch: amd64" to "beta.kubernetes.io/arch: amd64"

    THanks

    ------------------------------
    TOMASZ HANUSIAK
    ------------------------------



  • 3.  RE: How to install the metric server in Openshift v3.11

    Posted Wed February 12, 2020 09:05 PM
    Hi,


    Thank you for your cooperation.

    Once we made metric-server via https://github.com/kubernetes-incubator/metrics-server.git which did not work, that is why we deleted /metric-server/deploy/. Then we did as your instruction, however we got the message below.

    "kubectl create -f deploy/1.8+/
    error: the path "deploy/1.8+/" does not exist"

    Even if we created the directory, the message below is just shown.

    "kubectl create -f deploy/1.8+/
    error: error reading [deploy/1.8+/]: recognized file extensions are [.json .yaml .yml]"



    What should we do next?

    Kind regards,
    Chris


    ------------------------------
    Chris
    ------------------------------



  • 4.  RE: How to install the metric server in Openshift v3.11

    Posted Thu February 13, 2020 02:52 AM
    Hi.

    As per:
    https://github.com/kubernetes-sigs/metrics-server

    it should now be:
    kubectl create -f deploy/kubernetes/
    Thanks

    ------------------------------
    TOMASZ HANUSIAK
    ------------------------------



  • 5.  RE: How to install the metric server in Openshift v3.11

    Posted Thu February 13, 2020 03:07 AM
    Hi,


    Thank you for your cooperation.

    Trying it in kubernetes directory, we got this error message.

    "[root@xxx metrics-server]# cd metrics-server; kubectl create -f deploy/kubernetes/
    -bash: cd: metrics-server: No such file or directory
    Error from server (AlreadyExists): error when creating "deploy/kubernetes/aggregated-metrics-reader.yaml": clusterroles.rbac.authorization.k8s.io "system:aggregated-metrics-reader" already exists
    Error from server (AlreadyExists): error when creating "deploy/kubernetes/auth-delegator.yaml": clusterrolebindings.rbac.authorization.k8s.io "metrics-server:system:auth-delegator" already exists
    Error from server (AlreadyExists): error when creating "deploy/kubernetes/auth-reader.yaml": rolebindings.rbac.authorization.k8s.io "metrics-server-auth-reader" already exists
    Error from server (AlreadyExists): error when creating "deploy/kubernetes/metrics-apiservice.yaml": apiservices.apiregistration.k8s.io "v1beta1.metrics.k8s.io" already exists
    Error from server (AlreadyExists): error when creating "deploy/kubernetes/metrics-server-deployment.yaml": serviceaccounts "metrics-server" already exists
    Error from server (AlreadyExists): error when creating "deploy/kubernetes/metrics-server-deployment.yaml": deployments.apps "metrics-server" already exists
    Error from server (AlreadyExists): error when creating "deploy/kubernetes/metrics-server-service.yaml": services "metrics-server" already exists
    Error from server (AlreadyExists): error when creating "deploy/kubernetes/resource-reader.yaml": clusterroles.rbac.authorization.k8s.io "system:metrics-server" already exists
    Error from server (AlreadyExists): error when creating "deploy/kubernetes/resource-reader.yaml": clusterrolebindings.rbac.authorization.k8s.io "system:metrics-server" already exists""

    Should we delete the resources above? If so, could you tell me the way of deleting them?


    Warm regards,
    Chris

    ------------------------------
    Chris
    ------------------------------



  • 6.  RE: How to install the metric server in Openshift v3.11

    Posted Mon June 29, 2020 09:49 AM
    I still have issue understandng the documentation.
    There is no more deploy directory in the github files.
    Did anyone succeed in installing it ?

    ------------------------------
    Ronan Bourlier
    ------------------------------



  • 7.  RE: How to install the metric server in Openshift v3.11

    Posted Mon June 29, 2020 10:27 AM
    Edited by System Fri January 20, 2023 04:13 PM
    Hi,

    Please try:

    1. kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.3.6/components.yaml
    2. oc edit deployments metrics-server -n kube-system
    Modify "kubernetes.io/os=linux" to "beta.kubernetes.io/os=linux"
    kubernetes.io/arch: amd64 to "beta.kubernetes.io/arch: amd64"
    3. Once done, ensure the metric server pod is running
    oc get pods -n kube-system | grep metrics
    4. oc adm top node, oc adm top pods

    ------------------------------
    TOMASZ HANUSIAK
    ------------------------------



  • 8.  RE: How to install the metric server in Openshift v3.11

    Posted Mon June 29, 2020 12:14 PM
    Thanks. It works fine. I hate the fact that the warning message stays there even if it is working. Any idea why the warning keeps popping up?
    I lost a big amount of time as I thought it was not working and in fact, it was.

    ------------------------------
    Ronan Bourlier
    ------------------------------