参考文档 https://v1-26.docs.kubernetes.io/zh-cn/docs/concepts/cluster-administration/flow-control/ https://blog.csdn.net/sinat_37367944/article/details/116329588
API 优先级与公平性(APF)特性由特性门控控制,默认情况下启用
#! /bin/bash | |
set -x | |
set -e | |
# generate your token from https://github.com/settings/tokens and save it into gist-token.txt | |
token=$(cat gist-token.txt) | |
function cloneOrPull() { | |
page=$1 | |
curl -L \ | |
-H "Accept: application/vnd.github+json" \ |
参考文档 https://v1-26.docs.kubernetes.io/zh-cn/docs/concepts/cluster-administration/flow-control/ https://blog.csdn.net/sinat_37367944/article/details/116329588
API 优先级与公平性(APF)特性由特性门控控制,默认情况下启用
cat <<EOF | kubectl create -f - | |
apiVersion: apiextensions.k8s.io/v1beta1 | |
kind: CustomResourceDefinition | |
metadata: | |
name: tapps.apps.tkestack.io | |
spec: | |
group: apps.tkestack.io | |
version: v1 | |
names: | |
kind: TApp |
token=$(cat ~/.kube/config | grep token | awk -F: '{print $2}' | awk '{print $1}')
echo $token
server=$(cat ~/.kube/config | grep server | awk -F"server: " '{print $2}')
echo $server $token
curl -k -H "Authorization: Bearer ${token}" "${server}/apis/apps/v1/namespaces/default/statefulsets/ramists/scale"
{
package main | |
import ( | |
"bytes" | |
"flag" | |
"io/ioutil" | |
"log" | |
"net" | |
"net/http" | |
"net/http/httputil" |
wget https://get.helm.sh/helm-v3.2.1-linux-amd64.tar.gz
tar -zxvf helm-v3.2.1-linux-amd64.tar.gz
mv linux-amd64/helm /usr/local/bin/helm
helm repo add stable https://kubernetes-charts.storage.googleapis.com/
helm repo update
helm install grafana stable/grafana
kubectl port-forward --address 0.0.0.0 -n default svc/grafana 8081:80
# grafana password
kubectl get secret --namespace default grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo