diff --git a/Jenkinsfile b/Jenkinsfile index b7b76e0..667a8a1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -95,16 +95,20 @@ podTemplate( stage('Deploy Application on K8s') { container('kubectl') { - withKubeCredentials(kubectlCredentials: [[ - caCertificate: '', - clusterName: 'microk8s', - contextName: '', - credentialsId: 'jenkins-admin-secret', - namespace: 'kube-system', - serverUrl: 'https://192.168.50.10:16443']]) { + withKubeConfig([credentialsId: 'loafle_net-kubeconfig']) { + sh 'kubectl get pods -n dev' + } + + // withKubeConfig(kubectlCredentials: [[ + // caCertificate: '', + // clusterName: 'microk8s', + // contextName: '', + // credentialsId: 'loafle_net-kubeconfig', + // namespace: 'kube-system', + // serverUrl: 'https://192.168.50.10:16443']]) { - sh "kubectl config view" - } + // sh "kubectl config view" + // } } }