apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: "{{ template "fullname" . }}-master"
  labels:
    app: {{ template "fullname" . }}
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: "{{ template "fullname" . }}-master"
    spec:
      containers:
        - name: "{{ template "fullname" . }}-master"
          image: maru/nkube
          imagePullPolicy: IfNotPresent
          ports:
            - name: kubernetes-api
              containerPort: 443
            - name: discovery
              containerPort: 9898
          securityContext:
            privileged: true
          volumeMounts:
          - name: secret
            mountPath: /etc/nkube/secret
            readOnly: true
          - name: config
            mountPath: /etc/nkube/config
            readOnly: true
          {{- if .Values.baseCachePath }}
          - name: cache
            mountPath: /nkube-cache
          {{- end }}
          lifecycle:
            preStop:
              exec:
                command: ["/usr/local/bin/nkube.sh"]
      volumes:
        - name: secret
          secret:
            secretName: {{ template "fullname" . }}
        - name: config
          configMap:
            name: {{ template "fullname" . }}
        {{- if .Values.baseCachePath }}
        - name: cache
          hostPath:
            path: {{ .Values.baseCachePath }}
        {{- end }}

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: "{{ template "fullname" . }}-master"
  labels:
    app: {{ template "fullname" . }}
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: "{{ template "fullname" . }}-master"
    spec:
      containers:
        - name: "{{ template "fullname" . }}-master"
          image: maru/nkube
          imagePullPolicy: IfNotPresent
          ports:
            - name: kubernetes-api
              containerPort: 6443
            - name: discovery
              containerPort: 9898
          securityContext:
            privileged: true
          volumeMounts:
          - name: secret
            mountPath: /etc/nkube/secret
            readOnly: true
          - name: config
            mountPath: /etc/nkube/config
            readOnly: true
          {{- if .Values.baseCachePath }}
          - name: cache
            mountPath: /nkube-cache
          {{- end }}
          lifecycle:
            preStop:
              exec:
                command: ["/usr/local/bin/nkube.sh"]
      volumes:
        - name: secret
          secret:
            secretName: {{ template "fullname" . }}
        - name: config
          configMap:
            name: {{ template "fullname" . }}
        {{- if .Values.baseCachePath }}
        - name: cache
          hostPath:
            path: {{ .Values.baseCachePath }}
        {{- end }}

Update kube api port to 6443 (kubeadm default)
Update kube api port to 6443 (kubeadm default)
