라벨이 kubernetes인 게시물 표시

install redis on kubernetes

## set repo [root@k8smaster ~]# helm repo add bitnami https://charts.bitnami.com/bitnami "bitnami" has been added to your repositories ## set repo [root@k8smaster ~]# helm repo add bitnami https://charts.bitnami.com/bitnami^C [root@k8smaster ~]# helm install bitnami/redis NAME: esteemed-pug LAST DEPLOYED: Wed Jun 24 18:16:53 2020 NAMESPACE: default STATUS: DEPLOYED RESOURCES: ==> v1/ConfigMap NAME DATA AGE esteemed-pug-redis 3 0s esteemed-pug-redis-health 6 0s ==> v1/Pod(related) NAME READY STATUS RESTARTS AGE esteemed-pug-redis-master-0 0/1 Pending 0 0s esteemed-pug-redis-slave-0 0/1 Pending 0 0s ==> v1/Secret NAME TYPE DATA AGE esteemed-pug-redis Opaque 1 0s ==> v1/Service NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE esteemed-pug-redis-headless ClusterIP None <none> 6379/TCP

kube-state-metrics

#clone kube-state-metrics [root@k8s-master ~]# git clone https://github.com/kubernetes/kube-state-metrics.git Cloning into 'kube-state-metrics'... remote: Enumerating objects: 1, done. remote: Counting objects: 100% (1/1), done. remote: Total 18700 (delta 0), reused 0 (delta 0), pack-reused 18699 Receiving objects: 100% (18700/18700), 15.96 MiB | 3.60 MiB/s, done. Resolving deltas: 100% (11775/11775), done. #apply config [root@k8s-master kube-state-metrics]# kubectl apply -f examples/standard clusterrolebinding.rbac.authorization.k8s.io/kube-state-metrics created clusterrole.rbac.authorization.k8s.io/kube-state-metrics created deployment.apps/kube-state-metrics created serviceaccount/kube-state-metrics created service/kube-state-metrics created [root@k8s-master kube-state-metrics]# #create user [root@k8s-master kube-state-metrics]# kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=root clusterrolebinding.rbac

deploy docker image on kubernetes

#apply patch [root@k8s-master ~]# cat Dockerfile FROM openjdk:8-jdk MAINTAINER gnoti VOLUME /tmp ARG JAR_FILE=test.springboot.netty-0.0.1-SNAPSHOT.jar COPY ${JAR_FILE} app.jar ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"] EXPOSE 8088[root@k8s-master ~]# [root@k8s-master ~]# docker build -t gnotiboot . Sending build context to Docker daemon 157MB Step 1/7 : FROM openjdk:8-jdk ---> 3e50df58f25e Step 2/7 : MAINTAINER gnoti ---> Running in e3a88d96f015 Removing intermediate container e3a88d96f015 ---> 5cfc31ae7709 Step 3/7 : VOLUME /tmp ---> Running in 7c87f897218c Removing intermediate container 7c87f897218c ---> 002b046cc33b Step 4/7 : ARG JAR_FILE=test.springboot.netty-0.0.1-SNAPSHOT.jar ---> Running in 805698ab8292 Removing intermediate container 805698ab8292 ---> 539b5c4b2e87 Step 5/7 : COPY ${JAR_FILE} app.jar ---> ea2812dc02e7 Step 6/7 : ENTRYPOINT ["java","

error kubernetes metricserver

#show error [root@k8s-master kubernetes]# kubectl get pods -n kube-system NAME READY STATUS RESTARTS AGE coredns-66bff467f8-glbj5 1/1 Running 0 15d coredns-66bff467f8-s9zp2 1/1 Running 0 15d etcd-k8s-master 1/1 Running 0 15d kube-apiserver-k8s-master 1/1 Running 0 15d kube-controller-manager-k8s-master 1/1 Running 0 15d kube-proxy-s7kws 1/1 Running 0 15d kube-proxy-wd7dj 1/1 Running 0 15d kube-scheduler-k8s-master 1/1 Running 0 15d metrics-server-84cf4ddd7f-crd8w 0/1 ImagePullBackOff 0 59m metrics-server-fb5cb87fd-mdx9m 0/1 CrashLoopBackOff 3997 14d #fix error [root@k8s-master kubernetes]# wget