Skip to content

Instantly share code, notes, and snippets.

@songbinliu
Last active February 20, 2018 16:48
Show Gist options
  • Select an option

  • Save songbinliu/ec4ee3c4c2e4e7c56765beaacbdc562a to your computer and use it in GitHub Desktop.

Select an option

Save songbinliu/ec4ee3c4c2e4e7c56765beaacbdc562a to your computer and use it in GitHub Desktop.
deploy kubeturbo

the all-in-one yaml file for deploying kubeturbo. Dry run

kubectl --dry-run=true apply -f all.yaml 
---
apiVersion: v1
kind: Namespace
metadata:
  name: turbo 
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: turbo-user
  namespace: turbo
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1    
metadata:
  name: turbo-all-binding
  namespace: turbo
subjects:
- kind: ServiceAccount
  name: turbo-user
  namespace: turbo
roleRef:
  kind: ClusterRole
  name: cluster-admin
  apiGroup: rbac.authorization.k8s.io  
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: turbo-config
  namespace: turbo
data:
  turbo.config: |-
    {
        "communicationConfig": {
            "serverMeta": {
                "version": "6.0.1",
                "turboServer": "https://<Turbo_server_URL>"
            },
            "restAPIConfig": {
                "opsManagerUserName": "<Turbo_username>",
                "opsManagerPassword": "<Turbo_password>"
            }
        }
    }
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: kubeturbo
  namespace: turbo
  labels:
    app: kubeturbo
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: kubeturbo
    spec:
      serviceAccount: turbo-user
      containers:
        - name: kubeturbo
          # Replace the image with desired version
          image: vmturbo/kubeturbo:6.0.1
          imagePullPolicy: IfNotPresent
          args:
            - --turboconfig=/etc/kubeturbo/turbo.config
            - --v=2
            # Uncomment the following two args if running in Openshift
            #- --kubelet-https=true
            #- --kubelet-port=10250
            # Uncomment the following arg if running on a VCenter cluster
            #- --usevmware=true
          volumeMounts:
          - name: turbo-config
            mountPath: /etc/kubeturbo
            readOnly: true
      volumes:
      - name: turbo-config
        configMap:
          name: turbo-config
      restartPolicy: Always          
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment