| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248 |
- ---
- apiVersion: rbac.authorization.k8s.io/v1
- kind: ClusterRole
- metadata:
- name: proxy-clusterrole-kubeapiserver
- rules:
- - apiGroups: [""]
- resources:
- - nodes/metrics
- - nodes/proxy
- - nodes/stats
- - nodes/log
- - nodes/spec
- verbs: ["get", "list", "watch", "create"]
- ---
- apiVersion: rbac.authorization.k8s.io/v1
- kind: ClusterRoleBinding
- metadata:
- name: proxy-role-binding-kubernetes-master
- roleRef:
- apiGroup: rbac.authorization.k8s.io
- kind: ClusterRole
- name: proxy-clusterrole-kubeapiserver
- subjects:
- - apiGroup: rbac.authorization.k8s.io
- kind: User
- name: kube-apiserver
- ---
- apiVersion: v1
- kind: Namespace
- metadata:
- name: cattle-system
- ---
- apiVersion: v1
- kind: ServiceAccount
- metadata:
- name: cattle
- namespace: cattle-system
- ---
- apiVersion: rbac.authorization.k8s.io/v1
- kind: ClusterRoleBinding
- metadata:
- name: cattle-admin-binding
- namespace: cattle-system
- labels:
- cattle.io/creator: "norman"
- subjects:
- - kind: ServiceAccount
- name: cattle
- namespace: cattle-system
- roleRef:
- kind: ClusterRole
- name: cattle-admin
- apiGroup: rbac.authorization.k8s.io
- ---
- apiVersion: v1
- kind: Secret
- metadata:
- name: cattle-credentials-80151d8
- namespace: cattle-system
- type: Opaque
- data:
- url: "aHR0cHM6Ly9rOHMtc2VydmVy"
- token: "azR0Nzk2ZDZjc2dka3pyOXJ3MjR2dDdwZzlzNW16bG45dzRxNWQ3d2w2bHZsdHY0Y3RoMjU4"
- namespace: ""
- ---
- apiVersion: rbac.authorization.k8s.io/v1
- kind: ClusterRole
- metadata:
- name: cattle-admin
- labels:
- cattle.io/creator: "norman"
- rules:
- - apiGroups:
- - '*'
- resources:
- - '*'
- verbs:
- - '*'
- - nonResourceURLs:
- - '*'
- verbs:
- - '*'
- ---
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: cattle-cluster-agent
- namespace: cattle-system
- spec:
- selector:
- matchLabels:
- app: cattle-cluster-agent
- template:
- metadata:
- labels:
- app: cattle-cluster-agent
- spec:
- affinity:
- nodeAffinity:
- requiredDuringSchedulingIgnoredDuringExecution:
- nodeSelectorTerms:
- - matchExpressions:
- - key: kubernetes.io/os
- operator: NotIn
- values:
- - windows
- preferredDuringSchedulingIgnoredDuringExecution:
- - weight: 100
- preference:
- matchExpressions:
- - key: node-role.kubernetes.io/controlplane
- operator: In
- values:
- - "true"
- - weight: 1
- preference:
- matchExpressions:
- - key: node-role.kubernetes.io/etcd
- operator: In
- values:
- - "true"
- serviceAccountName: cattle
- tolerations:
- - operator: Exists
- containers:
- - name: cluster-register
- imagePullPolicy: IfNotPresent
- env:
- - name: CATTLE_FEATURES
- value: ""
- - name: CATTLE_SERVER
- value: "https://k8s-server"
- - name: CATTLE_CA_CHECKSUM
- value: "80133263142ecf49684f5a72e13c9ac613fce40afb85514123875530b55704dd"
- - name: CATTLE_CLUSTER
- value: "true"
- - name: CATTLE_K8S_MANAGED
- value: "true"
- image: rancher/rancher-agent:v2.4.18
- volumeMounts:
- - name: cattle-credentials
- mountPath: /cattle-credentials
- readOnly: true
- volumes:
- - name: cattle-credentials
- secret:
- secretName: cattle-credentials-80151d8
- defaultMode: 320
- ---
- apiVersion: apps/v1
- kind: DaemonSet
- metadata:
- name: cattle-node-agent
- namespace: cattle-system
- spec:
- selector:
- matchLabels:
- app: cattle-agent
- template:
- metadata:
- labels:
- app: cattle-agent
- spec:
- affinity:
- nodeAffinity:
- requiredDuringSchedulingIgnoredDuringExecution:
- nodeSelectorTerms:
- - matchExpressions:
- - key: kubernetes.io/os
- operator: NotIn
- values:
- - windows
- hostNetwork: true
- serviceAccountName: cattle
- tolerations:
- - operator: Exists
- containers:
- - name: agent
- image: rancher/rancher-agent:v2.4.18
- imagePullPolicy: IfNotPresent
- env:
- - name: CATTLE_NODE_NAME
- valueFrom:
- fieldRef:
- fieldPath: spec.nodeName
- - name: CATTLE_SERVER
- value: "https://k8s-server"
- - name: CATTLE_CA_CHECKSUM
- value: "80133263142ecf49684f5a72e13c9ac613fce40afb85514123875530b55704dd"
- - name: CATTLE_CLUSTER
- value: "false"
- - name: CATTLE_K8S_MANAGED
- value: "true"
- - name: CATTLE_AGENT_CONNECT
- value: "true"
- volumeMounts:
- - name: cattle-credentials
- mountPath: /cattle-credentials
- readOnly: true
- - name: k8s-ssl
- mountPath: /etc/kubernetes
- - name: var-run
- mountPath: /var/run
- - name: run
- mountPath: /run
- - name: docker-certs
- mountPath: /etc/docker/certs.d
- securityContext:
- privileged: true
- volumes:
- - name: k8s-ssl
- hostPath:
- path: /etc/kubernetes
- type: DirectoryOrCreate
- - name: var-run
- hostPath:
- path: /var/run
- type: DirectoryOrCreate
- - name: run
- hostPath:
- path: /run
- type: DirectoryOrCreate
- - name: cattle-credentials
- secret:
- secretName: cattle-credentials-80151d8
- defaultMode: 320
- - hostPath:
- path: /etc/docker/certs.d
- type: DirectoryOrCreate
- name: docker-certs
- updateStrategy:
- type: RollingUpdate
- rollingUpdate:
- maxUnavailable: 25%
|