Skip to content

Static pod for k3s-agent #3800

Discussion options

You must be logged in to vote

Try to fix your indentation of spec.containers:

apiVersion: v1
kind: Pod
metadata:
  labels:
    app: redis
  name: redis
  namespace: kube-system
spec:
  containers:
    - image: redis:6.2.4
      name: redis
      imagePullPolicy: IfNotPresent

I've just tried it on one of my agents. I can confirm that it does work!

On one of my agents I've created this file as /ssd/k3s/agent/pod-manifests/redis.yaml (/ssd/k3s is my k3s data-dir). A few seconds later, I can see the pod on my server node:

# kubectl -n kube-systems get pods
NAME                                           READY   STATUS      RESTARTS   AGE
coredns-7448499f4d-b9mnq                       1/1     Running     0          5d2h
he…

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by brandond
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #3797 on August 09, 2021 16:04.