美文网首页
helm初始化操作chaoskube

helm初始化操作chaoskube

作者: wowshiwoniu | 来源:发表于2020-07-15 16:47 被阅读0次

https://www.bbsmax.com/A/nAJvQkvmzr/

github demo 示例:https://github.com/linki/chaoskube/tree/master/examples

helm search hub chaoskube

helm search repo chaoskube

~$ helm search repo chaoskube
Error: no repositories configured

~$ helm repo list
Error: no repositories to show

# 阿里云的仓库版本比较早,才0.6
~$ helm repo add stable https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
"stable" has been added to your repositories
# 此源的仓库版本比较新
~$ helm repo add stable https://burdenbear.github.io/kube-charts-mirror/

~$ helm install chaoskube-release --set namespaces='default' stable/chaoskube --debug --dry-run

 helm install chaoskube-release stable/chaoskube --set namespaces='test',interval=1m,dryRun=false, replicas=10 -n chaoskube

--dry-run模式安装命令打印,默认dry-run=False,此模式下并不会真的运行,而是将命令参数打印出来

~$ helm install chaoskube-release --set namespaces='test' stable/chaoskube --debug --dry-run
install.go:158: [debug] Original chart version: ""
install.go:175: [debug] CHART PATH: /home/tsingj_ubuntu/.cache/helm/repository/chaoskube-3.1.4.tgz

NAME: chaoskube-release
LAST DEPLOYED: Fri Jun 12 11:06:48 2020
NAMESPACE: default
STATUS: pending-install
REVISION: 1
TEST SUITE: None
USER-SUPPLIED VALUES:
namespaces: test

COMPUTED VALUES:
affinity: {}
annotations: null
debug: false
dryRun: true
excludedDaysOfYear: null
excludedPodNames: null
excludedTimesOfDay: null
excludedWeekdays: null
gracePeriod: -1s
image: quay.io/linki/chaoskube
imageTag: v0.14.0
includedPodNames: null
interval: 10m
labels: null
logFormat: null
metrics:
  enabled: false
  port: 8080
  service:
    port: 8080
    type: ClusterIP
  serviceMonitor:
    additionalLabels: {}
    enabled: false
minimumAge: 0s
name: chaoskube
namespaces: test
nodeSelector: {}
podAnnotations: {}
podLabels: {}
priorityClassName: ""
rbac:
  create: false
  serviceAccountName: default
replicas: 1
resources: {}
timezone: UTC
tolerations: []

HOOKS:
MANIFEST:
---
# Source: chaoskube/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: chaoskube-release
  labels:
    app.kubernetes.io/name: chaoskube
    app.kubernetes.io/managed-by: "Helm"
    app.kubernetes.io/instance: "chaoskube-release"
    helm.sh/chart: chaoskube-3.1.4
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: chaoskube
      app.kubernetes.io/instance: chaoskube-release
  template:
    metadata:
      labels:
        app.kubernetes.io/name: chaoskube
        app.kubernetes.io/managed-by: "Helm"
        app.kubernetes.io/instance: "chaoskube-release"
        helm.sh/chart: chaoskube-3.1.4
    spec:
      containers:
        - name: chaoskube
          image: quay.io/linki/chaoskube:v0.14.0
          args:
            - --interval=10m
            - --labels=
            - --annotations=
            - --namespaces=test
            - --excluded-weekdays=
            - --excluded-times-of-day=
            - --excluded-days-of-year=
            - --timezone=UTC
            - --minimum-age=0s
            - --grace-period=-1s
            - --metrics-address=
          resources:
            {}
          securityContext:
            runAsNonRoot: true
            runAsUser: 65534
            readOnlyRootFilesystem: true
            capabilities:
              drop: ["ALL"]
      serviceAccountName: "default"

NOTES:
chaoskube is running and will kill arbitrary pods every 10m.

You can follow the logs to see what chaoskube does:

    POD=$(kubectl -n default get pods -l='app.kubernetes.io/instance=chaoskube-release' --output=jsonpath='{.items[0].metadata.name}')
    kubectl -n default logs -f $POD

You are running in dry-run mode. No pod is actually terminated.

相关文章

网友评论

      本文标题:helm初始化操作chaoskube

      本文链接:https://www.haomeiwen.com/subject/oyrgtktx.html