File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 11kube-config
22* .crt
33* .key
4- kubectl
Original file line number Diff line number Diff line change 2929 kubectl config set-context "remote-context" --cluster "minikube" --user "remote-dev"
3030 kubectl config use-context "remote-context"
3131
32- # kubectl command steps ... #
32+ # kubectl command steps ... #
3333 ```
3434
35353 . Create the full workflow
4747 on :
4848 push :
4949 branches :
50- - " 1-github-runner-manages-remote "
50+ - " main "
5151 jobs :
5252 deploy :
5353 runs-on : ubuntu-latest
7575 - name : Run kubectl command against remote API
7676 run : kubectl get namespaces
7777 ` ` `
78+
79+ - With this, we have remote access to the API in according with the RBAC rules we created earlier
80+ - If you wanted to ` kubectl apply -f` in this action, you could do so like below:
81+
82+ ` ` ` yaml
83+ # previous setup steps #
84+
85+ - name: kubectl apply with a file
86+ run: |
87+ kubectl apply -f "${GITHUB_WORKSPACE}/manifests/nginx-test.yml"
88+ ` ` `
You can’t perform that action at this time.
0 commit comments