


kubectl apply -f tcss.yaml .---apiVersion: v1kind: Namespacemetadata:name: tcss---apiVersion: rbac.authorization.k8s.io/v1kind: Rolemetadata:namespace: tcssname: tcss-adminrules:- apiGroups: ["extensions", "apps", ""]resources: ["*"]verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]---apiVersion: rbac.authorization.k8s.io/v1kind: RoleBindingmetadata:name: tcss-admin-rbnamespace: tcsssubjects:- kind: ServiceAccountname: tcss-agentnamespace: tcssapiGroup: ""roleRef:kind: Rolename: tcss-adminapiGroup: rbac.authorization.k8s.io---apiVersion: v1kind: ServiceAccountmetadata:name: tcss-agentnamespace: tcss---apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRolemetadata:name: security-clusterrolerules:- apiGroups: ["", "v1"]resources: ["namespaces", "pods", "nodes", "services", "serviceaccounts", "configmaps", "componentstatuses"]verbs: ["get", "list", "watch"]- apiGroups: ["apps","batch","extensions","rbac.authorization.k8s.io","networking.k8s.io","cilium.io"]resources: ["*"]verbs: ["get", "list","watch"]- apiGroups: ["networking.k8s.io"]resources: ["networkpolicies"]verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]- apiGroups: ["apiextensions.k8s.io"]resources: ["customresourcedefinitions"]verbs: ["list", "get","create"]- apiGroups: ["apiextensions.k8s.io"]resourceNames: ["tracingpolicies.cilium.io", "tracingpoliciesnamespaced.cilium.io"]resources: ["customresourcedefinitions"]verbs: ["list", "get", "update"]---apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRoleBindingmetadata:name: security-clusterrolebindingroleRef:apiGroup: rbac.authorization.k8s.iokind: ClusterRolename: security-clusterrolesubjects:- kind: ServiceAccountname: tcss-agentnamespace: tcss- kind: Username: tcssapiGroup: rbac.authorization.k8s.io---apiVersion: v1kind: Secretmetadata:name: tcss-agent-secretnamespace: tcssannotations:kubernetes.io/service-account.name: tcss-agenttype: kubernetes.io/service-account-token---apiVersion: batch/v1kind: Jobmetadata:name: init-tcss-agentnamespace: tcssspec:template:spec:serviceAccountName: tcss-agentcontainers:- image: ccr.ccs.tencentyun.com/yunjing_agent/agent:latestimagePullPolicy: Alwaysname: init-tcss-agentcommand: ["/home/work/yunjing-agent"]args: ["-token",'',"-vip",'','-cc']resources:limits:cpu: 100mmemory: 512Mirequests:cpu: 100mmemory: 128Mienv:- name: user_tagsvalue: "default"- name: k8s_namevalue: "11"- name: appidvalue: "1256299843"securityContext:privileged: truevolumeMounts:- mountPath: /run/secrets/kubernetes.io/tcss-agentname: token-projectionsecurityContext: {}hostPID: truerestartPolicy: Nevervolumes:- name: token-projectionsecret:secretName: tcss-agent-secretbackoffLimit: 5---apiVersion: apps/v1kind: DaemonSetmetadata:labels:k8s-app: yunjing-agentname: yunjing-agentnamespace: kube-systemannotations:config.kubernetes.io/depends-on: batch/v1/namespaces/tcss/jobs/init-tcss-secretsspec:selector:matchLabels:k8s-app: yunjing-agenttemplate:metadata:annotations:eks.tke.cloud.tencent.com/ds-injection: "true"labels:k8s-app: yunjing-agentspec:tolerations:- operator: Existscontainers:- image: ccr.ccs.tencentyun.com/yunjing_agent/agent:latestimagePullPolicy: Alwaysname: yunjing-agentcommand: ["/home/work/yunjing-agent"]args: ["-d","-token",'',"-vip",'']resources:limits:cpu: 250mmemory: 512Mirequests:cpu: 100mmemory: 128MisecurityContext:privileged: trueterminationMessagePath: /dev/termination-logterminationMessagePolicy: FilednsPolicy: ClusterFirstrestartPolicy: AlwaysschedulerName: default-schedulersecurityContext: {}terminationGracePeriodSeconds: 30hostNetwork: truehostPID: true---apiVersion: apps/v1kind: Deploymentmetadata:labels:k8s-app: tcss-assetname: tcss-assetnamespace: tcssspec:selector:matchLabels:k8s-app: tcss-assetreplicas: 1template:metadata:labels:k8s-app: tcss-assetannotations:eks.tke.cloud.tencent.com/ds-injection: "true"spec:serviceAccountName: tcss-agenttolerations:- operator: Existscontainers:- image: ccr.ccs.tencentyun.com/yunjing_agent/agent:latestimagePullPolicy: Alwaysname: tcss-assetcommand: ["/home/work/yunjing-agent"]args: ["-asset"]resources:limits:cpu: 100mmemory: 256Mirequests:cpu: 50mmemory: 64MisecurityContext:privileged: trueterminationMessagePath: /dev/termination-logterminationMessagePolicy: FilednsPolicy: ClusterFirstrestartPolicy: AlwaysschedulerName: default-schedulersecurityContext: {}terminationGracePeriodSeconds: 30hostPID: true
kubectl get jobs -n tcss .
kubectl get pods -n tcss | grep init-tcss-agent .
kubectl get daemonset -A -l k8s-app=yunjing-agent .
kubectl get pods -A -l k8s-app=yunjing-agent .
kubectl get deployment -n tcss
kubectl get pods -n tcss | grep tcss-asset
Feedback