Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix k8 to pull image from local (without registry) #2

Open
prayagupa opened this issue Jun 4, 2018 · 0 comments
Open

fix k8 to pull image from local (without registry) #2

prayagupa opened this issue Jun 4, 2018 · 0 comments

Comments

@prayagupa
Copy link
Owner

prayagupa commented Jun 4, 2018

also https://docs.docker.com/registry/deploying/

https://github.com/redhat-developer-demos/spring-boot-configmaps-demo

https://sdqali.in/blog/2016/11/04/a-very-basic-introduction-to-deploying-a-java-application-using-kubernetes/

with IfNotPresent -

Failed to pull image "rest-server:v1": rpc error: code = Unknown desc = Error response from daemon: pull access denied for rest-server, repository does not exist or may require 'docker login'

working,

{
  "kind": "Pod",
  "apiVersion": "v1",
  "metadata": {
    "name": "onlywallet-577dfdfcfc-knpwb",
    "generateName": "onlywallet-577dfdfcfc-",
    "namespace": "default",
    "selfLink": "/api/v1/namespaces/default/pods/onlywallet-577dfdfcfc-knpwb",
    "uid": "99290f50-66ea-11e8-a697-4a1ff279a322",
    "resourceVersion": "65944",
    "creationTimestamp": "2018-06-03T04:57:21Z",
    "labels": {
      "pod-template-hash": "1338989797",
      "run": "onlywallet"
    },
    "ownerReferences": [
      {
        "apiVersion": "extensions/v1beta1",
        "kind": "ReplicaSet",
        "name": "onlywallet-577dfdfcfc",
        "uid": "991ea528-66ea-11e8-a697-4a1ff279a322",
        "controller": true,
        "blockOwnerDeletion": true
      }
    ]
  },
  "spec": {
    "volumes": [
      {
        "name": "default-token-stfkz",
        "secret": {
          "secretName": "default-token-stfkz",
          "defaultMode": 420
        }
      }
    ],
    "containers": [
      {
        "name": "onlywallet",
        "image": "onlywallet-api:v1",
        "ports": [
          {
            "containerPort": 8080,
            "protocol": "TCP"
          }
        ],
        "resources": {},
        "volumeMounts": [
          {
            "name": "default-token-stfkz",
            "readOnly": true,
            "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount"
          }
        ],
        "terminationMessagePath": "/dev/termination-log",
        "terminationMessagePolicy": "File",
        "imagePullPolicy": "IfNotPresent"
      }
    ],
    "restartPolicy": "Always",
    "terminationGracePeriodSeconds": 30,
    "dnsPolicy": "ClusterFirst",
    "serviceAccountName": "default",
    "serviceAccount": "default",
    "nodeName": "minikube",
    "securityContext": {},
    "schedulerName": "default-scheduler",
    "tolerations": [
      {
        "key": "node.kubernetes.io/not-ready",
        "operator": "Exists",
        "effect": "NoExecute",
        "tolerationSeconds": 300
      },
      {
        "key": "node.kubernetes.io/unreachable",
        "operator": "Exists",
        "effect": "NoExecute",
        "tolerationSeconds": 300
      }
    ]
  },
  "status": {
    "phase": "Running",
    "conditions": [
      {
        "type": "Initialized",
        "status": "True",
        "lastProbeTime": null,
        "lastTransitionTime": "2018-06-03T04:57:21Z"
      },
      {
        "type": "Ready",
        "status": "True",
        "lastProbeTime": null,
        "lastTransitionTime": "2018-06-05T04:35:57Z"
      },
      {
        "type": "PodScheduled",
        "status": "True",
        "lastProbeTime": null,
        "lastTransitionTime": "2018-06-03T04:57:21Z"
      }
    ],
    "hostIP": "192.168.64.3",
    "podIP": "172.17.0.3",
    "startTime": "2018-06-03T04:57:21Z",
    "containerStatuses": [
      {
        "name": "onlywallet",
        "state": {
          "running": {
            "startedAt": "2018-06-05T04:35:56Z"
          }
        },
        "lastState": {
          "terminated": {
            "exitCode": 255,
            "reason": "Error",
            "startedAt": "2018-06-03T04:57:22Z",
            "finishedAt": "2018-06-05T04:35:19Z",
            "containerID": "docker://223b3d2692e340605bc4312c1a85ba2f09ea7813f300e4fed55e958e9fd82f2f"
          }
        },
        "ready": true,
        "restartCount": 1,
        "image": "onlywallet-api:v1",
        "imageID": "docker://sha256:ac06ab13e0899bb984eeb593559221419668230e4b795c500c3e144ba3326211",
        "containerID": "docker://40ce424890812b405c03fa3336df3f2b82ac6cb9bb43b25e1b515f41d9d0224a"
      }
    ],
    "qosClass": "BestEffort"
  }
}

2

kube error

message: E0920 01:32:05.001528 1 manager.go:101] Error in scraping containers from kubelet:10.x.x.x:10255: 
failed to get all container stats from Kubelet URL "http://10.x.x.x:10255/stats/container/": Post http://10.x.x.x:10255/stats/container/: 
dial tcp 10.x.x.x:10255: getsockopt: connection refused

3

kubebuilder/controller "msg"="Reconciler error" "error"="failed to build LoadBalancer configuration due to retrieval of subnets failed to resolve 2 qualified subnets. Subnets must contain the http://kubernetes.io/cluster/\u003ccluster name\u003e tag with a value of shared or owned and the http://kubernetes.io/role/internal-elb tag signifying it should be used for ALBs Additionally, there must be at least 2 subnets with unique availability zones as required by ALBs. Either tag subnets to meet this requirement or use the subnets annotation on the ingress resource to explicitly call out what subnets to use for ALB creation. The subnets that did resolve were []" "Controller"="kube-ingress-controller" 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant