title: eks error : certificate-authority-data and certificate-authority are both specified for kubernetes
body: <p>I have a EKS setup ( kubernetes) with config file :</p>
  
  <pre><code>apiVersion: v1
  clusters:
  - cluster:
      certificate-authority-data: REDACTED
      server: https://E3D13176159D2CA5C51AF0622AFE252C.yl4.us-east-1.eks.amazonaws.com
    name: kubernetes
  contexts:
  - context:
      cluster: kubernetes
      user: aws
    name: aws
  current-context: aws
  kind: Config
  preferences: {}
  users:
  - name: aws
    user:
      exec:
        apiVersion: client.authentication.k8s.io/v1alpha1
        args:
        - token
        - -i
        - terraform-eks-demo-green
        command: aws-iam-authenticator
        env: null
  </code></pre>
  
  <p><strong>the certificate-authority-data here is self signed (comes with EKS AMI)</strong> , I am trying to set up a private docker registry for kubernetes (artifactory) which is https and uses internal cert.</p>
  
  <p>so while applying my container I do the following :</p>
  
  <pre><code>kubectl apply  --certificate-authority='internal-ca.pem' -f echo-service.yaml
  </code></pre>
  
  <p>which fails with :</p>
  
  <blockquote>
    <p>error: certificate-authority-data and certificate-authority are both
    specified for kubernetes. certificate-authority-data will override.</p>
  </blockquote>
  
  <p>How do I setup a container to use the different ca cert other than the one defined in docker config ?</p>
  
  <p>Currently any applying of container fails with :</p>
  
  <blockquote>
    <p>x509: certificate signed by unknown authority</p>
  </blockquote>
  
  <p>because its using the former cert.. </p>