Skip to content

Commit a993876

Browse files
committed
Kubectl apply test on remote
1 parent 5fb1315 commit a993876

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

.github/workflows/kubectl.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,8 @@ jobs:
2828
kubectl config set-context "remote-context" --cluster "minikube" --user "remote-dev"
2929
kubectl config use-context "remote-context"
3030
31-
- name: Run kubectl command against remote API
31+
- name: Check kubectl has authenticated/authorized access to the remote API
3232
run: kubectl get namespaces
33+
34+
- name: kubectl apply with a file
35+
run: kubectl apply -f "${HOME}/${GITHUB_REPOSITORY}/manifests/nginx-test.yml"

manifests/nginx-test.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Create an nginx pod
2+
3+
apiVersion: v1
4+
kind: Pod
5+
metadata:
6+
name: nginx-pod
7+
labels:
8+
app: nginx
9+
spec:
10+
containers:
11+
- name: nginx-container
12+
image: nginx:latest
13+
ports:
14+
- containerPort: 80

0 commit comments

Comments
 (0)