$ mkdir <any-path>/tolerations$ cd <any-path>/tolerations
$ kubectl get noNAME STATUS ROLES AGE VERSION192.168.1.146 Ready <none> 200d v1.18.4-tke.13
$ kubectl taint nodes 192.168.1.146 hbase=true:NoSchedule
$ kubectl get node 192.168.1.146 -o yaml | grep taints -A3taints:- effect: NoSchedulekey: hbasevalue: "true"
apiVersion: data.fluid.io/v1alpha1kind: Datasetmetadata:name: hbasespec:mounts:- mountPoint: https://mirrors.tuna.tsinghua.edu.cn/apache/hbase/stable/name: hbasetolerations:- key: hbaseoperator: Equalvalue: "true"
$ kubectl create -f dataset.yamldataset.data.fluid.io/hbase created
apiVersion: data.fluid.io/v1alpha1kind: GooseFSRuntimemetadata:name: hbasespec:replicas: 1tieredstore:levels:- mediumtype: SSDpath: /mnt/disk1quota: 2Ghigh: "0.95"low: "0.7"
spec.replicas 속성은 1로 설정되어 있으며, 이는 Fluid가 GooseFS Master 1개와 GooseFS Worker 1개가 포함된 GooseFS 인스턴스를 실행할 것임을 나타냅니다. $ kubectl create -f runtime.yamlgoosefsruntime.data.fluid.io/hbase created$ kubectl get pod -o wideNAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATEShbase-fuse-n4tnc 1/1 Running 0 63m 192.168.1.146 192.168.1.146 <none> <none>hbase-master-0 2/2 Running 0 85m 192.168.1.146 192.168.1.146 <none> <none>hbase-worker-qs26l 2/2 Running 0 63m 192.168.1.146 192.168.1.146 <none> <none>
$ kubectl get goosefsruntime hbase -o wideNAME READY MASTERS DESIRED MASTERS MASTER PHASE READY WORKERS DESIRED WORKERS WORKER PHASE READY FUSES DESIRED FUSES FUSE PHASE AGEhbase 1 1 Ready 1 1 Ready 1 1 Ready 4m3s
apiVersion: apps/v1beta1kind: StatefulSetmetadata:name: nginxlabels:app: nginxspec:replicas: 1serviceName: "nginx"podManagementPolicy: "Parallel"selector: # define how the deployment finds the pods it managesmatchLabels:app: nginxtemplate: # define the pods specificationsmetadata:labels:app: nginxspec:tolerations:- key: hbaseoperator: Equalvalue: "true"containers:- name: nginximage: nginxvolumeMounts:- mountPath: /dataname: hbase-volvolumes:- name: hbase-volpersistentVolumeClaim:claimName: hbase
$ kubectl create -f app.yamlstatefulset.apps/nginx created
$ kubectl get pod -o wide -l app=nginxNAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATESnginx-0 1/1 Running 0 2m5s 192.168.1.146 192.168.1.146 <none> <none>
$ kubectl delete -f .$ kubectl taint nodes 192.168.1.146 hbase=true:NoSchedule-
피드백